ANSI fixes
----------
-- Fix any function arg mismatch (use -Werror=) (too many arg)
-- Fix format argument related warnings
+- Build with -Werror=maybe-uninitialized
- Recheck warnings with -Wall
Future TODO List
#include "numeric.h"
#include "msg.h"
#include "sbuf.h"
+#include <stdio.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/socket.h>
+#include <inttypes.h>
#include <stdint.h>
#include <pwd.h>
#include <signal.h>
was_here = YES;
#ifdef USE_SYSLOG
- (void) syslog(LOG_WARNING, "Restarting Server because: %s, sbrk(0)-etext: %lld",
+ (void) syslog(LOG_WARNING, "Restarting Server because: %s, sbrk(0)-etext: %ld",
mesg, (intptr_t)sbrk((size_t)0) - (intptr_t)sbrk0);
#endif
server_reboot();
if (timeofday < lasttimeofday)
{
- ircsprintf(to_send, "System clock running backwards - (%d < %d)",
- timeofday, lasttimeofday);
+ ircsprintf(to_send, "System clock running backwards - (%" PRIu64
+ " < %" PRIu64 ")",
+ (uint64_t)timeofday, (uint64_t)lasttimeofday);
report_error(to_send, &me);
}
dst += ircsprintf(dst, " %d", rwho_opts.thismatches);
if (rwho_opts.rplfields & RWO_TS)
- dst += ircsprintf(dst, " %d", ac->tsinfo);
+ dst += ircsprintf(dst, " %ld", (long)ac->tsinfo);
if (rwho_opts.rplfields & RWO_STYPE)
dst += ircsprintf(dst, " %d", ac->user->servicetype);
else if (optlen > 0)
{
for (*readbuf = '\0'; optlen > 0; optlen--, s += 3)
- ircsprintf(s, "%02.2x:", *t++);
+ ircsprintf(s, "%02x:", *t++);
*s = '\0';
sendto_realops("Connection %s using IP opts: (%s)",
get_client_name(cptr, HIDEME), readbuf);
/* We steal this message from undernet, because mIRC detects it
* and doesn't try to autoreconnect */
elength = ircsnprintf(errbufr, 512, "ERROR :Your host is trying "
- "to (re)connect too fast -- throttled.\r\n",
- tp->addr);
+ "to (re)connect too fast -- throttled.\r\n");
send(fd, errbufr, elength, 0);
tp->zline_start = sotime;