Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


On 09/22/2014 08:32 PM, Jan Hubicka wrote:
On 09/20/2014 04:39 AM, Jan Hubicka wrote:
/usr/include/X11/Xlib.h:948:3: warning: type ‘struct XAnyEvent’ violates one definition rule [-Wodr]
  } XAnyEvent;
    ^
/usr/include/X11/Xlib.h:948:3: note: a different type is defined in another translation unit
  } XAnyEvent;
    ^
/usr/include/X11/Xlib.h:947:9: note: the first difference of corresponding definitions is field 
‘window’
   Window window; /* window on which event was requested in event mask */
          ^
/usr/include/X11/Xlib.h:947:9: note: a field of same name but different type is defined in another 
translation unit
   Window window; /* window on which event was requested in event mask */
          ^
/usr/include/X11/X.h:96:13: note: type ‘XLIB_Window’ should match type ‘Window’
  typedef XID Window;
              ^
/usr/include/X11/X.h:96:13: note: the incompatible type is defined here
  typedef XID Window;
              ^

...so unwinding of typedefs (a la, "note: type 'XID' is defined
here") could be helpful in tracking this down.

Typedefs are transparent for type mangling, so I do not thing you get warnings
on those at all.  Here I think the problem is that someone gets idea to #define
Window ZLIB_Window perhaps here
http://dev-builds.libreoffice.org/lcov_reports/master~2014-04-11_00.55.10/extensions/source/plugin/inc/plugin/unx/plugcon.hxx.gcov.html

Ah, right, good catch. Our XLIB_* "trick" from include/{pre,post}x.h (which had been duplicated in extensions/source/plugin/inc/plugin/unx/plugcon.hxx prior to <http://cgit.freedesktop.org/libreoffice/core/commit/?id=15c609f33da44c24e1d0cf19670b0da43738ce0c> "Use prex.h/postx.h"). Should go away once <https://bugs.freedesktop.org/show_bug.cgi?id=82577> "get rid of prex.h / postx.h wrapper headers" is fully fixed.

Stephan


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.