chiark / gitweb /
fix warnings master
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 5 Jul 2022 11:43:54 +0000 (12:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 5 Jul 2022 11:43:54 +0000 (12:43 +0100)
Makefile
main.c
nnrpwrap.c
nyxpostrun.c

index ae8db6d76c6d6d3ff794d2e0c668b2c0303c1ad9..2b3767e80a4e3b0062c7c8560d5a02dbbebbe494 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CFLAGS= -Wall -Wwrite-strings -Wpointer-arith -Wnested-externs \
+CFLAGS= -Wall -Wwrite-strings -Wpointer-arith -Wnested-externs -Wno-format-overflow \
        -Wmissing-declarations -Wmissing-prototypes -O3 -g
 # -DDEBUG
 LDFLAGS= -s
diff --git a/main.c b/main.c
index ff798f8571a48104212423aa64160e4becbffe34..439a6888cdade19cb71c64a722048710ef38b9a3 100644 (file)
--- a/main.c
+++ b/main.c
@@ -43,7 +43,7 @@ int stripcommand(char *buf) {
 void die(const char *msg) {
   int e;
   e= errno;
-  printf("400 server failure: %s - %s\r\n",msg,strerror(errno));
+  printf("400 server failure: %s - %s\r\n",msg,strerror(e));
   exit(0);
 }
 
index 8b144bfcb748a8cf3d0ee2fb08497cfd4124d039..1e4c620a431881fa09a77e7352696a14a526207c 100644 (file)
@@ -29,7 +29,8 @@ int main(int argc, char **argv) {
   char responsebuf[300];
   char sesamebuf[MAX_SECRET*2+100];
   struct sockaddr_in peername;
-  int c, namesize, n, l;
+  int c, n, l;
+  socklen_t namesize;
   struct MD5Context md5ctx;
   FILE *file;
   unsigned long ul;
index b7e0c31b7a335454e8220ba8f50567ddc5099db1..6978d90419dbcf7fb07904055e21df21672c5290 100644 (file)
@@ -1,5 +1,6 @@
 #include <unistd.h>
 #include <stdio.h>
+#include <stdlib.h>
 int main(int argc, char **argv) {
   int g;
   g= getegid();