[Bug 767883] New: Bit shift overflow (-Wshift-overflow) warning in gstmessage.h

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Jun 20 18:23:20 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=767883

            Bug ID: 767883
           Summary: Bit shift overflow (-Wshift-overflow) warning in
                    gstmessage.h
    Classification: Platform
           Product: GStreamer
           Version: 1.8.2
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: common
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: aeikum at codeweavers.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

When building 32-bit Wine with gstreamer, I get this warning with gcc 6.1.1
20160602:

gcc -m32 -c -o gstdemux.o gstdemux.c -I. -I../../include
-I/usr/include/gstreamer-1.0 \
  -I/usr/lib32/gstreamer-1.0/include -I/usr/include/glib-2.0
-I/usr/lib32/glib-2.0/include \
  -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement \
  -Wempty-body -Wignored-qualifiers -Wshift-overflow=2 -Wstrict-prototypes
-Wtype-limits \
  -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op
-gdwarf-2 \
  -gstrict-dwarf -fno-omit-frame-pointer -g -O2 -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=0
In file included from /usr/include/gstreamer-1.0/gst/gstevent.h:184:0,
                 from /usr/include/gstreamer-1.0/gst/gstpadtemplate.h:36,
                 from /usr/include/gstreamer-1.0/gst/gstpad.h:72,
                 from /usr/include/gstreamer-1.0/gst/gstelement.h:57,
                 from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from gstdemux.c:24:
/usr/include/gstreamer-1.0/gst/gstmessage.h:156:29: warning: result of β€˜1 <<
31’ requires 33 bits to represent, but β€˜int’ only has 32 bits
[-Wshift-overflow=]
   GST_MESSAGE_EXTENDED          = (1 << 31),


Enums are defined to be "int" so putting this bit there hits the sign flag,
which gcc doesn't like. Maybe it should use some method other than bit-shift to
set that bit. Even just disabling the warning would probably be fine.

See also Bug 767882 in glib2.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list