From 96e64e6385fe5619e388be76f60ecd012dc281af Mon Sep 17 00:00:00 2001 From: b Date: Sat, 12 Aug 2023 20:28:46 +0000 Subject: [PATCH] fix what's pointed out by warnings --- bot3.1.c | 7 +++---- index.1.c | 7 +------ post.1.c | 2 +- posted.1.c | 4 +--- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/bot3.1.c b/bot3.1.c index ee808d8..b345cfd 100644 --- a/bot3.1.c +++ b/bot3.1.c @@ -1,8 +1,7 @@ // OTT mirror -// Copyright (C) 2014, 2022 Balthasar Szczepański +// Copyright (C) 2014, 2022, 2023 Balthasar Szczepański // bot3.c (bothasar_p) automatically generated from bot3.1.c // the post bot. -// 29.09.2022 // // This file is part of OTT mirror. // @@ -84,7 +83,7 @@ int main(int argc, char *argv[]) // unsigned long posts=0xffffffff; unsigned long pwait=5; - unsigned long np, lastnp, firstnp, i; + unsigned long np, lastnp, firstnp; unsigned short p, lastp, firstp; char name[N_STRBUF]; @@ -208,7 +207,7 @@ int main(int argc, char *argv[]) fclose(cwfile); } printf(" Start after np %lu, post %hu.",firstnp,firstp); - for(i=0,np=firstnp;np<=lastnp;++np) + for(np=firstnp;np<=lastnp;++np) { p=0; printf("\nnp%lu:",np); diff --git a/index.1.c b/index.1.c index a83bac6..1fe575a 100644 --- a/index.1.c +++ b/index.1.c @@ -1,8 +1,7 @@ // OTT mirror -// Copyright (C) 2014, 2022 Balthasar Szczepański +// Copyright (C) 2014, 2022, 2023 Balthasar Szczepański // index.c automatically generated from index.1.c // view the front page. -// 29.09.2022 // // This file is part of OTT mirror. // @@ -19,7 +18,6 @@ // You should have received a copy of the GNU Affreo General Public License // along with OTT mirror. If not, see . -#include #include #include #include @@ -36,7 +34,6 @@ int main(int argc, char **argv) { - s_cgi *cgi; pid_t sub; uid_t euid; gid_t egid; @@ -50,8 +47,6 @@ int main(int argc, char **argv) if ((r = setregid(egid, egid))) return (r = errno); - cgi=cgiInit(); - printf("Content-type: text/html\n\n"); fflush(stdout); sub=fork(); diff --git a/post.1.c b/post.1.c index 247f55a..124f667 100644 --- a/post.1.c +++ b/post.1.c @@ -382,7 +382,7 @@ void submit() } else snprintf(arg1,N_STRBUF,"info=

This message has been posted successfully.

View your submitted message

Return to the ЯOЯЯIM TTO

",timenumber,timenumber); - snprintf(arg2,N_STRBUF,"refresh=",timenumber,timenumber); + snprintf(arg2,N_STRBUF,"refresh=",timenumber,timenumber); printf("Content-type: text/html\n\n"); fflush(stdout); diff --git a/posted.1.c b/posted.1.c index 2d0d8ca..7643708 100644 --- a/posted.1.c +++ b/posted.1.c @@ -1,8 +1,7 @@ // OTT mirror -// Copyright (C) 2014, 2022 Balthasar Szczepański +// Copyright (C) 2014, 2022, 2023 Balthasar Szczepański // posted.c automatically generated from posted.1.c // posts recently sent from the mirror. -// 29.09.2022 // // This file is part of OTT mirror. // @@ -54,7 +53,6 @@ int main(int argc, char **argv) char filename[N_STRBUF_SH]; char postpath[N_STRBUF]; FILE *tempfile; - FILE *postfile; /* always be yourself in your total life */ euid = geteuid(); -- 2.30.2