]> The Tcpdump Group git mirrors - tcpslice/commitdiff
Address a few warnings from Sun C.
authorDenis Ovsienko <[email protected]>
Thu, 14 Mar 2024 18:41:41 +0000 (18:41 +0000)
committerDenis Ovsienko <[email protected]>
Thu, 14 Mar 2024 18:42:49 +0000 (18:42 +0000)
cc: Studio 12.6 Sun C 5.15 SunOS_i386 2017/05/30

"./seek-tell.c", line 57: warning: implicit function declaration: fseeko
"./seek-tell.c", line 63: warning: implicit function declaration: ftello
"./tcpslice.c", line 183: warning: implicit function declaration: getopt
"./tcpslice.c", line 205: warning: statement not reached
"./tcpslice.c", line 302: warning: implicit function declaration: fileno

CHANGES
seek-tell.c
tcpslice.c

diff --git a/CHANGES b/CHANGES
index e51d2ed2ecfdcac92f89979a500d2a58f5c01864..d1bbe47c8dd8a6e7ab1fcfefb7a3ae0c0e1fc4e8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
 v1.8 ...
+- Address a few warnings from Sun C.
 
 v1.7 Tue 23 Jan 12:31:18 GMT 2024
 
index 57ef1b3c419d0b4dbbd8c46e59dcdfb1b245abfa..e8c110d8aeaff943bc9bff473e43784ab2e3be16 100644 (file)
 #include <config.h>
 #endif
 
+// For fseeko() and ftello().
+#if defined(__SUNPRO_C) && ! defined(__EXTENSIONS__)
+#define __EXTENSIONS__
+#endif
+
 #include <stdio.h>
 #include <errno.h>
 
index 22075468b4b40afd6da1a7bdcdbd78aa421da5cb..5c3d81bec713e2f1a998c023587bdc24874b3945 100644 (file)
 #include <config.h>
 #endif
 
+// For fileno() and getopt().
+#if defined(__SUNPRO_C) && ! defined(__EXTENSIONS__)
+#define __EXTENSIONS__
+#endif
+
 #include <sys/types.h>
 #include <sys/file.h>
 #include <sys/stat.h>
@@ -202,7 +207,7 @@ main(int argc, char **argv)
                case 'h':
                        print_usage(stdout);
                        exit(0);
-                       break;
+                       /* NOTREACHED */
 
                case 'l':
                        relative_time_merge = 1;