chiark / gitweb /
+ * Kill bogus warning, adh-main.c: `arg2' might be used uninitialized ...
authorian <ian>
Wed, 13 Sep 2000 22:17:58 +0000 (22:17 +0000)
committerian <ian>
Wed, 13 Sep 2000 22:17:58 +0000 (22:17 +0000)
@@ -1,6 +1,8 @@
+  * Kill bogus warning, adh-main.c: `arg2' might be used uninitialized ...
+  * #include <sys/types.h> and <unistd.h> for fcntl in */*.c.

changelog
client/adh-main.c
client/adnsresfilter.c
regress/hcommon.c.m4
regress/hplayback.c.m4
regress/hrecord.c.m4

index 2a2acdaeead00e53a1bf3ac0c6d91637ea8b0857..dae059321fac9e5e4c8449762b7f71c1e9329ae9 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,6 +1,8 @@
 adns (0.10) unstable; urgency=low
 
   * Fix <sys/fcntl.h> in client/adnsresfilter.c to <fcntl.h>.
+  * Kill bogus warning, adh-main.c: `arg2' might be used uninitialized ...
+  * #include <sys/types.h> and <unistd.h> for fcntl in */*.c.
 
  --
 
index 16412949666e40fda65631ebc735156e6a64c245..094295efdb4d4595ace09483a421e55f45db1eff 100644 (file)
@@ -125,7 +125,7 @@ static void process_optarg(const char *arg,
       } else if (oip->type == ot_funcarg2) {
        assert(argv_p);
        arg= *++(*argv_p);
-       if (arg) arg2= *++(*argv_p);
+       arg2= arg ? *++(*argv_p) : 0;
        if (!arg || !arg2)
          usageerr("option --%s requires two more arguments", oip->lopt);
       } else {
index 316b0e21534be0630dd7000225d20d122e137d76..db7a6310485b9327aba05b07ecaad71ab71b3e71 100644 (file)
@@ -33,6 +33,8 @@
 #include <assert.h>
 #include <ctype.h>
 
+#include <sys/types.h>
+#include <unistd.h>
 #include <fcntl.h>
 
 #include "adns.h"
index fab7c820903df66d9efb51e73a3c94f0d06392ac..2238cda571f8376ad5d875d10ee76f5f3e5c9e81 100644 (file)
@@ -25,15 +25,18 @@ m4_dnl  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 m4_include(hmacros.i4)
 
-#include <fcntl.h>
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
 
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <unistd.h>
+#include <fcntl.h>
+
 #include "harness.h"
 #include "internal.h"
 
index bb36528a484a4bda4179ef1be368b8ea40b1a5ea..22e975a6eeb65d5a216746d34ab5d0f971e5e51d 100644 (file)
@@ -27,14 +27,17 @@ m4_include(hmacros.i4)
 
 #include <assert.h>
 #include <string.h>
-#include <fcntl.h>
 #include <errno.h>
 #include <stdlib.h>
 
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <unistd.h>
+#include <fcntl.h>
+
 #include "harness.h"
 
 static FILE *Tinputfile, *Treportfile;
index 17f70344c72b4ad21abac83fd144fd03430fbae8..58d3636703d0cd7370aabec858758d7fc3f550f2 100644 (file)
@@ -27,10 +27,13 @@ m4_include(hmacros.i4)
 
 #include <assert.h>
 #include <string.h>
-#include <fcntl.h>
 #include <errno.h>
 #include <stdlib.h>
 
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+
 #include "harness.h"
 
 static FILE *Toutputfile;