ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 1225] New: duplicated includes

Date: Tue, 14 Nov 2006 18:00:59 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1225

           Summary: duplicated includes
           Product: Wireshark
           Version: 0.99.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: nikai@xxxxxxxxx


Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
Attempting a simple cleanup of duplicated includes, will attach patch.
Example:

diff -uprN wireshark-0.99.4.orig/epan/dissectors/packet-afp.c
wireshark-0.99.4/epan/dissectors/packet-afp.c
--- wireshark-0.99.4.orig/epan/dissectors/packet-afp.c  2006-10-31
18:59:03.000000000 +0100
+++ wireshark-0.99.4/epan/dissectors/packet-afp.c       2006-11-14
16:12:15.000000000 +0100
@@ -33,7 +33,6 @@
 #include <stdio.h>
 #include <string.h>

-#include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
 /* #include <epan/strutil.h> */



Additionally, there are two such cases not included in the patch that look like
they're not working as intended:


1. "#include <string.h>" in getopt.c:

#include <string.h>
(..)
#ifdef  __GNU_LIBRARY__
/* We want to avoid inclusion of string.h with non-GNU libraries
   because there are many ways it can cause trouble.
   On some systems, it contains special magic macros that don't work
   in GCC.  */
#include <string.h>
#define my_index        strchr
#else


2. "#include <fcntl.h>" in gtk/rtp_analysis.c:

#include <fcntl.h>
(..)
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.