1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 20:46:39 +02:00

Fixed make strict build and cleaned up some warnings

This commit is contained in:
Adam
2010-09-07 18:39:57 -04:00
parent 7dfc8e8ee8
commit 3a97d196f9
10 changed files with 36 additions and 36 deletions
+1
View File
@@ -87,6 +87,7 @@
#include <winsock.h>
#include <windows.h>
#endif
#define h_addr h_addr_list[0] /* for backwards compatability, see man gethostbyname */
#include <sys/stat.h> /* for umask() on some systems */
#include <sys/types.h>
+3 -3
View File
@@ -95,7 +95,7 @@ int do_sendpass(User * u)
if (!mail)
return MOD_CONT;
fprintf(mail->pipe, getstring2(founder, CHAN_SENDPASS_HEAD));
fprintf(mail->pipe, "%s", getstring2(founder, CHAN_SENDPASS_HEAD));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(founder, CHAN_SENDPASS_LINE_1),
ci->name);
@@ -103,9 +103,9 @@ int do_sendpass(User * u)
fprintf(mail->pipe, getstring2(founder, CHAN_SENDPASS_LINE_2),
tmp_pass);
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(founder, CHAN_SENDPASS_LINE_3));
fprintf(mail->pipe, "%s", getstring2(founder, CHAN_SENDPASS_LINE_3));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(founder, CHAN_SENDPASS_LINE_4));
fprintf(mail->pipe, "%s", getstring2(founder, CHAN_SENDPASS_LINE_4));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(founder, CHAN_SENDPASS_LINE_5),
NetworkName);
+3 -3
View File
@@ -472,16 +472,16 @@ int do_sendregmail(User * u, NickRequest * nr)
if (!mail) {
return -1;
}
fprintf(mail->pipe, getstring2(NULL, NICK_REG_MAIL_HEAD));
fprintf(mail->pipe, "%s", getstring2(NULL, NICK_REG_MAIL_HEAD));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(NULL, NICK_REG_MAIL_LINE_1), nr->nick);
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(NULL, NICK_REG_MAIL_LINE_2), s_NickServ,
nr->passcode);
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(NULL, NICK_REG_MAIL_LINE_3));
fprintf(mail->pipe, "%s", getstring2(NULL, NICK_REG_MAIL_LINE_3));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(NULL, NICK_REG_MAIL_LINE_4));
fprintf(mail->pipe, "%s", getstring2(NULL, NICK_REG_MAIL_LINE_4));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(NULL, NICK_REG_MAIL_LINE_5),
NetworkName);
+3 -3
View File
@@ -92,16 +92,16 @@ int do_sendpass(User * u)
if (!mail)
return MOD_CONT;
fprintf(mail->pipe, getstring(na, NICK_SENDPASS_HEAD));
fprintf(mail->pipe, "%s", getstring(na, NICK_SENDPASS_HEAD));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring(na, NICK_SENDPASS_LINE_1), na->nick);
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring(na, NICK_SENDPASS_LINE_2),
tmp_pass);
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring(na, NICK_SENDPASS_LINE_3));
fprintf(mail->pipe, "%s", getstring(na, NICK_SENDPASS_LINE_3));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring(na, NICK_SENDPASS_LINE_4));
fprintf(mail->pipe, "%s", getstring(na, NICK_SENDPASS_LINE_4));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring(na, NICK_SENDPASS_LINE_5),
NetworkName);
-1
View File
@@ -45,7 +45,6 @@ void moduleAddHostServCmds(void)
void get_hostserv_stats(long *nrec, long *memuse)
{
long count = 0, mem = 0;
int i;
HostCore *hc;
for (hc = head; hc; hc = hc->next) {
+18 -18
View File
@@ -274,24 +274,24 @@ void anope_cmd_notice2(char *source, char *dest, char *msg)
void anope_cmd_action(char *source, char *dest, const char *fmt, ...)
{
va_list args;
char buf[BUFSIZE];
char actionbuf[BUFSIZE];
*buf = '\0';
*actionbuf = '\0';
if (fmt) {
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_list args;
char buf[BUFSIZE];
char actionbuf[BUFSIZE];
*buf = '\0';
*actionbuf = '\0';
if (fmt) {
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_end(args);
}
if (!*buf) {
return;
}
snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s %c", 1, buf, 1);
ircdproto.ircd_cmd_privmsg(source, dest, actionbuf);
}
void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...)
{
+3 -3
View File
@@ -385,7 +385,7 @@ static void new_memo_mail(NickCore * nc, Memo * m)
fprintf(mail->pipe, getstring2(NULL, MEMO_MAIL_TEXT2), m->sender,
m->number);
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, getstring2(NULL, MEMO_MAIL_TEXT3));
fprintf(mail->pipe, "%s", getstring2(NULL, MEMO_MAIL_TEXT3));
fprintf(mail->pipe, "\n\n");
fprintf(mail->pipe, "%s", m->text);
fprintf(mail->pipe, "\n");
@@ -425,10 +425,10 @@ void rsend_notify(User * u, Memo * m, const char *chan)
nick or channel */
if (chan) {
fmt = getstring(na, MEMO_RSEND_CHAN_MEMO_TEXT);
sprintf(text, fmt, chan);
snprintf(text, sizeof(text), fmt, chan);
} else {
fmt = getstring(na, MEMO_RSEND_NICK_MEMO_TEXT);
sprintf(text, fmt);
snprintf(text, sizeof(text), "%s", fmt);
}
/* Send notification */
+3 -3
View File
@@ -299,7 +299,7 @@ void modules_unload_all(boolean fini, boolean unload_proto)
}
if ((ano_modclose(mh->m->handle)) != 0)
alog(ano_moderr());
alog("%s", ano_moderr());
else
delModule(mh->m);
} else {
@@ -641,7 +641,7 @@ int loadModule(Module * m, User * u)
ano_modclearerr();
m->handle = ano_modopen(m->filename);
if ( m->handle == NULL && (err = ano_moderr()) != NULL) {
alog(err);
alog("%s", err);
return MOD_ERR_NOLOAD;
}
ano_modclearerr();
@@ -760,7 +760,7 @@ int unloadModule(Module * m, User * u)
}
if ((ano_modclose(m->handle)) != 0) {
alog(ano_moderr());
alog("%s", ano_moderr());
if (u) {
notice_lang(s_OperServ, u, OPER_MODULE_REMOVE_FAIL, m->name);
}
+1 -1
View File
@@ -900,7 +900,7 @@ void inspircd_cmd_pong(char *servname, char *who)
/* JOIN */
void inspircd_cmd_join(char *user, char *channel, time_t chantime)
{
send_cmd(user, "JOIN %s %ld", channel, (unsigned int)chantime);
send_cmd(user, "JOIN %s %ld", channel, chantime);
}
/* UNSQLINE */
+1 -1
View File
@@ -152,7 +152,7 @@ void alog(const char *fmt, ...)
time(&t);
tm = *localtime(&t);
strftime(buf, sizeof(buf) - 1, "[%b %d %H:%M:%S %Y] ", &tm);
if (logfile && args) {
if (logfile) {
fputs(buf, logfile);
vfprintf(logfile, fmt, args);
fputc('\n', logfile);