Skip to content
Snippets Groups Projects
Commit bf691df1 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix small warnings

parent 9b6c993c
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,9 @@ class GmshClient {
return -1; // Error: Couldn't create socket
// try to connect socket to given name
struct sockaddr_un addr_un;
strcpy(addr_un.sun_path, sockname);
memset((char *) &addr_un, 0, sizeof(addr_un));
addr_un.sun_family = AF_UNIX;
strcpy(addr_un.sun_path, sockname);
for(int tries = 0; tries < 5; tries++) {
if(connect(_sock, (struct sockaddr *)&addr_un, sizeof(addr_un)) >= 0)
return _sock;
......
/* $Id: GmshClient.c,v 1.5 2006-02-25 00:15:01 geuzaine Exp $ */
/* $Id: GmshClient.c,v 1.6 2006-02-25 19:07:50 geuzaine Exp $ */
/*
* Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
*
......@@ -131,8 +131,9 @@ int Gmsh_Connect(char *sockname)
if(sock < 0)
return -1; /* Error: Couldn't create socket */
/* try to connect socket to given name */
strcpy(addr_un.sun_path, sockname);
memset((char *) &addr_un, 0, sizeof(addr_un));
addr_un.sun_family = AF_UNIX;
strcpy(addr_un.sun_path, sockname);
for(tries = 0; tries < 5; tries++) {
if(connect(sock, (struct sockaddr *)&addr_un, sizeof(addr_un)) >= 0)
return sock;
......
/* $Id: solver.c,v 1.5 2006-02-25 14:36:53 geuzaine Exp $ */
/* $Id: solver.c,v 1.6 2006-02-25 19:07:50 geuzaine Exp $ */
/*
* Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
*
......@@ -47,6 +47,10 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if !defined(WIN32) || defined(__CYGWIN__)
#include <unistd.h>
#endif
#include "GmshClient.h"
typedef enum { options, run } action;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment