Browse Source

Remove compiler warnings

pre-master-46
Holger Vogt 5 years ago
parent
commit
176023f470
  1. 4
      src/xspice/icm/table/mada/alloc.c
  2. 6
      src/xspice/icm/table/support/gettokens.c
  3. 4
      src/xspice/ipc/ipcsockets.c

4
src/xspice/icm/table/mada/alloc.c

@ -41,9 +41,9 @@ sf_alloc(int n /* number of elements */,
/* Use calloc so that any internal allocations will be set to NULL to
* facilitate error recovery */
if ((ptr = calloc(n, size)) == NULL) {
if ((ptr = calloc((size_t)n, size)) == NULL) {
cm_message_printf("%s: cannot allocate %zd bytes : ",
__FILE__, n * size);
__FILE__, (size_t)n * size);
return NULL;
}

6
src/xspice/icm/table/support/gettokens.c

@ -30,7 +30,7 @@ char *CNVgettok(char **s)
/* skip over any white space */
while (isspace(**s) || (**s == '=') ||
while (isspace_c(**s) || (**s == '=') ||
(**s == '(') || (**s == ')') || (**s == ','))
(*s)++;
@ -49,7 +49,7 @@ char *CNVgettok(char **s)
/* or a mess o' characters. */
i = 0;
while ( (**s != '\0') &&
(! ( isspace(**s) || (**s == '=') ||
(! ( isspace_c(**s) || (**s == '=') ||
(**s == '(') || (**s == ')') ||
(**s == ',')
) ) ) {
@ -63,7 +63,7 @@ char *CNVgettok(char **s)
/* skip over white space up to next token */
while (isspace(**s) || (**s == '=') ||
while (isspace_c(**s) || (**s == '=') ||
(**s == '(') || (**s == ')') || (**s == ','))
(*s)++;

4
src/xspice/ipc/ipcsockets.c

@ -166,7 +166,7 @@ ipc_transport_initialize_server (
/* with version 1 (mailboxes) functions of the same names. */
{
struct sockaddr_in server; /* Server specifications for socket*/
unsigned int server_length; /* Size of server structure */
int server_length; /* Size of server structure */
int port_num; /* Port number converted from server_name */
NG_IGNORE(mode);
@ -513,7 +513,7 @@ ipc_transport_get_line (
if (sock_state == IPC_SOCK_INITIALIZED) {
/* We have an open socket but have not connected to a client. */
/* Accept a connection from a client. */
msg_stream = accept (sock_desc, (struct sockaddr *)0, (unsigned int *)0);
msg_stream = accept (sock_desc, (struct sockaddr *)0, (socklen_t*)0);
if (msg_stream == -1) {
fprintf (stderr, "ERROR: IPC: Server accepting request\n");

Loading…
Cancel
Save