+ * 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 2a2acda..dae0593 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 1641294..094295e 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 316b0e2..db7a631 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 fab7c82..2238cda 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 bb36528..22e975a 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 17f7034..58d3636 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;