Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2014 01:51:51 GMT
From:      Edwin Groothuis <edwin@mavetju.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/186219: net-mgmt/libsmi - Clang / GCC issue
Message-ID:  <201401290151.s0T1ppbE082744@oldred.freebsd.org>
Resent-Message-ID: <201401290200.s0T200R5083934@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186219
>Category:       ports
>Synopsis:       net-mgmt/libsmi - Clang / GCC issue
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 29 02:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Edwin Groothuis
>Release:        10.0
>Organization:
-
>Environment:
FreeBSD t43.nbttech.com 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Wireshark fails to compile with -WC++-compat on smi.h:

In file included from epan.c:63:
/usr/local/include/smi.h:319:1: error: empty struct has size 0 in C, size 1 in
      C++ [-Werror,-Wc++-compat]



>How-To-Repeat:

>Fix:
In smi.h:

 /* SmiElement -- an item in a list (row index column, notification object)   */
 typedef struct SmiElement {
+#ifdef __clang__
+    char dummy;         /* CLANG complains about this with -WC++-compat */
+#endif
 #ifndef __GNUC__
     char dummy;         /* many compilers are unhappy with empty structures. */
 #endif
     /* no visible attributes */
 } SmiElement;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401290151.s0T1ppbE082744>