Remove compiler warnings

This commit is contained in:
Holger Vogt 2021-01-03 14:28:22 +01:00
parent d0ef8618a1
commit 176023f470
3 changed files with 7 additions and 7 deletions

View File

@ -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;
}

View File

@ -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)++;

View File

@ -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");