diff --git a/src/api-command.c b/src/api-command.c index f9c3db4bb..9d4b5f687 100644 --- a/src/api-command.c +++ b/src/api-command.c @@ -41,7 +41,7 @@ int CommandExists(char *name) Command *CommandAdd(Module *module, char *cmd, int (*func)(), unsigned char params, int flags) { - Command *command; + Command *command = NULL; aCommand *c; if (find_Command_simple(cmd)) diff --git a/src/ssl.c b/src/ssl.c index 7fcdc9ecc..2c7123c28 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -597,7 +597,7 @@ int ircd_SSL_accept(aClient *acptr, int fd) { snprintf(buf, sizeof(buf), "ERROR :STARTTLS received but this is an SSL-only port. Check your connect settings. " "If this is a server linking in then add 'ssl' in your link::outgoing::options block.\r\n"); - send(fd, buf, strlen(buf), 0); + (void)send(fd, buf, strlen(buf), 0); return fatal_ssl_error(SSL_ERROR_SSL, SAFE_SSL_ACCEPT, ERRNO, acptr); } if (n > 0) diff --git a/src/support.c b/src/support.c index 7d7c1c781..6741dc9a9 100644 --- a/src/support.c +++ b/src/support.c @@ -69,11 +69,12 @@ char *my_itoa(int i) char *strtoken(char **save, char *str, char *fs) { - char *pos = *save; /* keep last position across calls */ - char *tmp; + char *pos, *tmp; if (str) pos = str; /* new string scan */ + else + pos = *save; /* keep last position across calls */ while (pos && *pos && index(fs, *pos) != NULL) pos++; /* skip leading separators */ diff --git a/src/updconf.c b/src/updconf.c index cd4734829..597ada24b 100644 --- a/src/updconf.c +++ b/src/updconf.c @@ -254,9 +254,9 @@ char *updconf_addquotes(char *str) int upgrade_me_block(ConfigEntry *ce) { ConfigEntry *cep, *cepp; - char *name; - char *info; - int numeric; + char *name = NULL; + char *info = NULL; + int numeric = 0; char sid[16];