Commit 8bf5e97a authored by deuce's avatar deuce
Browse files

Fix warnings.

parent 93989083
......@@ -60,7 +60,7 @@ char *usage=
" ALLUSERS -L30 /FA add 'A' to flag set #1 for all level 30+ users\n"
" ALLUSERS /F3-G remove 'G' from flag set #3 for all users\n"
" ALLUSERS -F2B /E-P remove 'P' exemption for all users with FLAG '2B'\n"
" ALLUSERS /R+W add 'W' restriction for all users\n"
" ALLUSERS /R+W add 'W' restriction for all users"
;
/****************************************************************************/
......@@ -165,7 +165,7 @@ int main(int argc, char **argv)
printf("\nALLUSERS v2.10 - Bulk User Editor for Synchronet User Database\n");
if(argc<2) {
printf(usage);
puts(usage);
exit(1);
}
dir[0]=0;
......@@ -201,7 +201,7 @@ int main(int argc, char **argv)
reqexempt|=FLAG(toupper(argv[i][j]));
break;
default: /* Unrecognized include */
printf(usage);
puts(usage);
exit(1);
}
......@@ -383,7 +383,7 @@ int main(int argc, char **argv)
printf("\n");
break;
default:
printf(usage);
puts(usage);
exit(1);
}
else {
......
......@@ -75,7 +75,7 @@ main(int argc, char **argv)
read(file, &t, 4L);
if (read(file, &stats, sizeof(stats_t)) != sizeof(stats_t)) {
close(file);
printf("Error reading %u bytes from %s\r\n", sizeof(stats_t), str);
printf("Error reading %" XP_PRIsize_t "u bytes from %s\r\n", sizeof(stats_t), str);
exit(1);
}
close(file);
......@@ -111,73 +111,73 @@ main(int argc, char **argv)
t = dstrtounix(&cfg, str);
break;
case 'L':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.logons = atol(str);
break;
case 'O':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.ltoday = atol(str);
break;
case 'T':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.timeon = atol(str);
break;
case 'I':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.ttoday = atol(str);
break;
case 'U':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.uls = atol(str);
break;
case 'B':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.ulb = atol(str);
break;
case 'D':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.dls = atol(str);
break;
case 'W':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.dlb = atol(str);
break;
case 'P':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.ptoday = atol(str);
break;
case 'E':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.etoday = atol(str);
break;
case 'F':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.ftoday = atol(str);
break;
case 'N':
printf(nv);
fputs(nv,stdout);
fgets(str, sizeof(str), stdin);
if (isdigit(str[0]))
stats.nusers = atoi(str);
......
......@@ -161,8 +161,7 @@ char *usage="\nusage: qwknodes [-opts] cmds"
"\n a = append existing output files"
"\n t = include tag lines in nodes.dat"
"\n l = include local users in users.dat"
"\n m# = maximum message age set to # days"
"\n";
"\n m# = maximum message age set to # days";
int main(int argc, char **argv)
{
......@@ -206,7 +205,7 @@ int main(int argc, char **argv)
while(isdigit(argv[i][j+1])) j++;
break;
default:
printf(usage);
puts(usage);
return(1);
}
j--;
......@@ -221,12 +220,12 @@ int main(int argc, char **argv)
cmd|=NODES;
break;
default:
printf(usage);
puts(usage);
return(1);
}
if(!cmd) {
printf(usage);
puts(usage);
return(1);
}
......
......@@ -189,14 +189,12 @@ static const char* telnet_usage = "Terminal server settings:\n\n"
"\ttc enable sysop availability for chat\n"
"\ttq disable QWK events\n"
"\tt- disable Terminal server\n"
"\n"
;
static const char* ftp_usage = "FTP server settings:\n"
"\n"
"\tfp<port> set FTP server port\n"
"\tfo<value> set FTP server options value (advanced)\n"
"\tf- disable FTP server\n"
"\n"
;
static const char* mail_usage = "Mail server settings:\n"
"\n"
......@@ -209,20 +207,17 @@ static const char* mail_usage = "Mail server settings:\n"
"\tm- disable Mail server (entirely)\n"
"\tmp- disable POP3 server\n"
"\tms- disable SendMail thread\n"
"\n"
;
static const char* services_usage = "Services settings:\n"
"\n"
"\tso<value> set Services option value (advanced)\n"
"\ts- disable Services (no services module)\n"
"\n"
;
static const char* web_usage = "Web server settings:\n"
"\n"
"\twp<port> set HTTP server port\n"
"\two<value> set Web server option value (advanced)\n"
"\tw- disable Web server (no services module)\n"
"\n"
;
static int lputs(int level, char *str)
{
......@@ -1151,15 +1146,15 @@ static void show_usage(char *cmd)
{
printf(usage,cmd);
if(has_bbs)
printf(telnet_usage);
puts(telnet_usage);
if(has_ftp)
printf(ftp_usage);
puts(ftp_usage);
if(has_mail)
printf(mail_usage);
puts(mail_usage);
if(has_services)
printf(services_usage);
puts(services_usage);
if(has_web)
printf(web_usage);
puts(web_usage);
}
/****************************************************************************/
......
......@@ -1213,7 +1213,7 @@ char *decompile_ars(uchar *ars, int len)
break;
default:
printf("Error decoding AR: %02Xh, offset: %u\n", *in, in-ars);
printf("Error decoding AR: %02Xh, offset: %ld\n", *in, (long)(in-ars));
return("Unknown ARS String");
}
switch(*in) {
......@@ -1351,7 +1351,7 @@ void decompile(FILE *bin, FILE *srcfile)
}
src[0]=0;
if(labels[currpos])
sprintf(src,":label_%04x\n",currpos);
sprintf(src,":label_%04" XP_PRIsize_t "x\n",currpos);
switch(uch) {
case CS_USE_INT_VAR:
usevar=TRUE;
......@@ -2363,7 +2363,7 @@ int main(int argc, char **argv)
fclose(cache);
}
}
printf("Will brute-force up to %d chars\n",brute_len);
printf("Will brute-force up to %" XP_PRIsize_t "d chars\n",brute_len);
continue;
}
bin=fopen(argv[f],"rb");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment