1. 11 Feb, 2015 12 commits
    • Alan Coopersmith's avatar
      dmx: constify GCOps & GCFuncs pointers · a0e44ddf
      Alan Coopersmith authored
      
      
      Gets rid of 16 instances of gcc 4.8 warnings:
      
      In file included from dmxgc.c:41:0:
      dmx.h:327:23: warning: assignment discards ‘const’ qualifier from
       pointer target type [enabled by default]
           (_saved)->_entry  = (_actual)->_entry;    \
                             ^
      dmxgc.h:80:5: note: in expansion of macro ‘DMX_WRAP’
           DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC));   \
           ^
      dmxgc.c:192:5: note: in expansion of macro ‘DMX_GC_FUNC_EPILOGUE’
           DMX_GC_FUNC_EPILOGUE(pGC);
           ^
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      a0e44ddf
    • Alan Coopersmith's avatar
      dmx: Mark glxIsExtensionSupported as a const char * · 9682c47e
      Alan Coopersmith authored
      
      
      Gets rid of 9 instances of gcc 4.8 warning:
      
      glxcmds.c: In function ‘CreateContext’:
      glxcmds.c:378:13: warning: passing argument 1 of ‘glxIsExtensionSupported’
       discards ‘const’ qualifier from pointer target type [enabled by default]
                   else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
                   ^
      In file included from glxserver.h:49:0,
                       from glxcmds.c:41:
      glxscreens.h:53:12: note: expected ‘char *’ but argument is of type
       ‘const char *’
       extern int glxIsExtensionSupported(char *ext);
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      9682c47e
    • Alan Coopersmith's avatar
      dmx: remove redundant redeclarations of variables from other headers · 45ec646d
      Alan Coopersmith authored
      
      
      Gets rid of these gcc 4.8 warnings:
      
      dmxcb.c:50:12: warning: redundant redeclaration of ‘PanoramiXPixWidth’
       [-Wredundant-decls]
       extern int PanoramiXPixWidth;
                  ^
      In file included from dmxcb.c:49:0:
      ../../Xext/panoramiXsrv.h:12:22: note: previous declaration of
       ‘PanoramiXPixWidth’ was here
       extern _X_EXPORT int PanoramiXPixWidth;
                            ^
      dmxcb.c:51:12: warning: redundant redeclaration of ‘PanoramiXPixHeight’
       [-Wredundant-decls]
       extern int PanoramiXPixHeight;
                  ^
      In file included from dmxcb.c:49:0:
      ../../Xext/panoramiXsrv.h:13:22: note: previous declaration of
       ‘PanoramiXPixHeight’ was here
       extern _X_EXPORT int PanoramiXPixHeight;
                            ^
      dmxcb.c:52:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’
       [-Wredundant-decls]
       extern int PanoramiXNumScreens;
                  ^
      In file included from dmxcb.c:49:0:
      ../../Xext/panoramiXsrv.h:11:22: note: previous declaration of
       ‘PanoramiXNumScreens’ was here
       extern _X_EXPORT int PanoramiXNumScreens;
                            ^
      
      dmxpict.c:60:12: warning: redundant redeclaration of ‘RenderErrBase’
       [-Wredundant-decls]
       extern int RenderErrBase;
                  ^
      In file included from ../../render/glyphstr.h:29:0,
                       from ../../render/picturestr.h:28,
                       from dmx.h:65,
                       from dmxpict.c:42:
      ../../render/picture.h:176:22: note: previous declaration of ‘RenderErrBase’
       was here
       extern _X_EXPORT int RenderErrBase;
                            ^
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      45ec646d
    • Alan Coopersmith's avatar
      dmx: remove redundant declaration of dmxFontPrivateIndex from dmxfont.h · 1033b851
      Alan Coopersmith authored
      
      
      Gets rid of 8 instances of gcc 4.8 warning:
      
      In file included from glxcmds.c:38:0:
      ../../../hw/dmx/dmxfont.h:57:12: warning: redundant redeclaration of
       ‘dmxFontPrivateIndex’ [-Wredundant-decls]
       extern int dmxFontPrivateIndex;
                  ^
      In file included from glxcmds.c:35:0:
      ../../../hw/dmx/dmx.h:388:12: note: previous declaration of
       ‘dmxFontPrivateIndex’ was here
       extern int dmxFontPrivateIndex;        /**< Private index for Fonts     */
                  ^
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      1033b851
    • Alan Coopersmith's avatar
      dmx: glxproxy prototype cleanup · ac64a653
      Alan Coopersmith authored
      
      
      Gets rid of 107 -Wmissing-prototypes & -Wredundant-decls warnings
      from gcc 4.8
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      ac64a653
    • Alan Coopersmith's avatar
      dmx: more unshadowing of variables · bd563fd4
      Alan Coopersmith authored
      
      
      Gets rid of gcc 4.8 warnings:
      
      dmxinputinit.c: In function ‘dmxInputScanForExtensions’:
      dmxinputinit.c:877:14: warning: declaration of ‘display’ shadows a global declaration [-Wshadow]
           Display *display;
                    ^
      In file included from ../../../include/windowstr.h:60:0,
                       from dmxinputinit.c:72:
      ../../../include/opaque.h:52:30: warning: shadowed declaration is here [-Wshadow]
       extern _X_EXPORT const char *display;
                                    ^
      
      glxcmds.c: In function ‘__glXCreatePbuffer’:
      glxcmds.c:3397:21: warning: declaration of ‘pc’ shadows a parameter [-Wshadow]
                   CARD32 *pc = (CARD32 *) (be_req + 1);
                           ^
      glxcmds.c:3314:52: warning: shadowed declaration is here [-Wshadow]
       __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
                                                          ^
      
      glxscreens.c: In function ‘CalcServerVersionAndExtensions’:
      glxscreens.c:139:35: warning: declaration of ‘req’ shadows a previous local [-Wshadow]
               xGLXQueryServerStringReq *req;
                                         ^
      glxscreens.c:68:26: warning: shadowed declaration is here [-Wshadow]
           xGLXQueryVersionReq *req;
                                ^
      glxscreens.c:140:36: warning: declaration of ‘reply’ shadows a previous local [-Wshadow]
               xGLXQueryServerStringReply reply;
                                          ^
      glxscreens.c:69:27: warning: shadowed declaration is here [-Wshadow]
           xGLXQueryVersionReply reply;
                                 ^
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      bd563fd4
    • Alan Coopersmith's avatar
      dmx: attempt to untangle nested loops using same index variable · 57e08fae
      Alan Coopersmith authored
      
      
      This doesn't just make gcc sad, it makes my brain sad.
      
      Change from:
          for (i = 0; i < dmxNumScreens; i++) {
              int i;
              for (i = 0; i < nconfigs; i++) {
                  for (j = 0; j < dmxScreen->beNumVisuals; j++) {
      
      to the easier to follow:
          for (i = 0; i < dmxNumScreens; i++) {
              for (j = 0; j < nconfigs; j++) {
                  for (k = 0; k < dmxScreen->beNumVisuals; k++) {
      
      Gets rid of gcc 4.8 warning:
      
      dmxinit.c: In function ‘InitOutput’:
      dmxinit.c:765:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
                   int i;
                       ^
      dmxinit.c:608:9: warning: shadowed declaration is here [-Wshadow]
           int i;
               ^
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      57e08fae
    • Alan Coopersmith's avatar
      dmx: remove unused variables · 0fbebad7
      Alan Coopersmith authored
      
      
      Gets rid of gcc 4.8 warnings:
      
      dmxscrinit.c: In function ‘dmxBEScreenInit’:
      dmxscrinit.c:83:15: warning: unused variable ‘gcvals’ [-Wunused-variable]
           XGCValues gcvals;
                     ^
      
      dmxwindow.c: In function ‘dmxResizeWindow’:
      dmxwindow.c:860:19: warning: variable ‘pSibPriv’ set but not used [-Wunused-but-set-variable]
           dmxWinPrivPtr pSibPriv;
                         ^
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      0fbebad7
    • Alan Coopersmith's avatar
      dmx: fix printf format argument warnings · f358f0d5
      Alan Coopersmith authored
      
      
      Gets rid of these gcc 4.8 warnings:
      
      dmxinit.c: In function ‘dmxErrorHandler’:
      dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
       but argument 3 has type ‘XID64’ [-Wformat=]
                      ev->resourceid);
                      ^
      dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
       but argument 3 has type ‘XID64’ [-Wformat=]
                      ev->resourceid);
                      ^
      dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
       but argument 3 has type ‘XID64’ [-Wformat=]
                      ev->resourceid);
                      ^
      dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’,
       but argument 3 has type ‘long unsigned int’ [-Wformat=]
                  ev->serial);
                  ^
      dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’,
       but argument 3 has type ‘long unsigned int’ [-Wformat=]
                  dpy->request);
                  ^
      dmxinit.c: In function ‘InitOutput’:
      dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’,
       but argument 3 has type ‘long unsigned int’ [-Wformat=]
               dmxLog(dmxInfo, "Generation:         %d\n", dmxGeneration);
               ^
      
      dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’:
      dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long
       unsigned int’, but argument 4 has type ‘Window’ [-Wformat=]
                              dmxScreen->name, win, tp.value);
                              ^
      dmxprop.c: In function ‘dmxPropertyWindow’:
      dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
       unsigned int’, but argument 5 has type ‘Window’ [-Wformat=]
                      other->index, other->name, other->scrnWin);
                      ^
      dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
       unsigned int’, but argument 8 has type ‘Window’ [-Wformat=]
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      f358f0d5
    • Alan Coopersmith's avatar
      dmx: move format strings inline so gcc can check · 11af200b
      Alan Coopersmith authored
      
      
      Gets rid of gcc 4.8 warnings:
      
      dmxprint.c: In function ‘dmxConfigPrintPair’:
      dmxprint.c:284:25: warning: format not a string literal,
        argument types not checked [-Wformat-nonliteral]
                               p->ysign < 0 ? '-' : '+', p->y);
                               ^
      dmxprint.c:289:9: warning: format not a string literal,
        argument types not checked [-Wformat-nonliteral]
               dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y);
               ^
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      11af200b
    • Alan Coopersmith's avatar
      dmx: Add _X_ATTRIBUTE_PRINTF to dmxConfigLog() & dmxConfigOutput() · 5e01eac1
      Alan Coopersmith authored
      
      
      Gets rid of gcc 4.8 warnings:
      
      dmxparse.c: In function ‘dmxConfigLog’:
      dmxparse.c:61:5: warning: function might be possible candidate for
       ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
           vprintf(format, args);      /* RATS: All calls to dmxConfigLog from
           ^
      
      dmxprint.c: In function ‘dmxConfigOutput’:
      dmxprint.c:149:9: warning: function might be possible candidate for
       ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
               pos += vfprintf(str, format, args);     /* assumes no newlines! */
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      5e01eac1
    • Alan Coopersmith's avatar
      Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls · 9e002dfc
      Alan Coopersmith authored
      
      
      Use typedefs to work around dtrace dropping const qualifiers from probe
      arguments when generating Xserver-dtrace.h.   Add new probes.h header to
      avoid having to replicate these typedefs in every file with dtrace probes.
      
      Gets rid of these warnings from gcc 4.8:
       getevents.c:1096:9:
        warning: passing argument 6 of '__dtrace_Xserver___input__event' discards
        'const' qualifier from pointer target type [enabled by default]
       getevents.c:1096:9:
        warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
        'const' qualifier from pointer target type [enabled by default]
       getevents.c:1651:9:
        warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
        'const' qualifier from pointer target type [enabled by default]
       getevents.c:1651:9:
        warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
        'const' qualifier from pointer target type [enabled by default]
       getevents.c:1791:9:
        warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
        'const' qualifier from pointer target type [enabled by default]
       getevents.c:1791:9:
        warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
        'const' qualifier from pointer target type [enabled by default]
       getevents.c:1921:9:
        warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
        'const' qualifier from pointer target type [enabled by default]
       getevents.c:1921:9:
        warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
        'const' qualifier from pointer target type [enabled by default]
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      9e002dfc
  2. 10 Feb, 2015 2 commits
  3. 02 Feb, 2015 1 commit
  4. 30 Jan, 2015 1 commit
  5. 27 Jan, 2015 1 commit
  6. 26 Jan, 2015 2 commits
  7. 23 Jan, 2015 11 commits
  8. 16 Jan, 2015 1 commit
  9. 10 Jan, 2015 2 commits
    • Keith Packard's avatar
      5f2e8ac5
    • Jasper St. Pierre's avatar
      modesetting: Update the cursor without hiding it · 4e12d7b6
      Jasper St. Pierre authored
      
      
      In the new KMS APIs, the legacy drmModeSetCursor ioctl actually waits
      for a vblank after changing the cursor image before returning, meaning
      that the X server, in attempting to hide the cursor before updating
      its image, actually makes that hide *visible* for a full vblank.
      
      It's unknown why the X server does this by default, but turn it off.
      
      If we're with a legacy driver that doesn't support the modern
      drmModeSetCursor by waiting for a vblank before returning, we're going
      to get a tiny bit of tearing on the cursor plane. But between tearing
      with a new cursor image and tearing with a blank cursor image, I'd
      rather the former.
      
      The only proper solution to this is an atomic ioctl that page flips
      all planes, including the cursor plane, at vblank time and at the same
      time.
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      4e12d7b6
  10. 06 Jan, 2015 2 commits
  11. 05 Jan, 2015 4 commits
  12. 04 Jan, 2015 1 commit
    • Peter Hutterer's avatar
      xfree86: rename Xorg.bin to Xorg · de89c6b8
      Peter Hutterer authored
      
      
      If the suid wrapper is enabled, /usr/bin/Xorg is just a shell script that
      execs either /usr/libexec/Xorg.bin directly or the Xorg.wrap binary which then
      execve's /usr/libexec/Xorg.bin.
      
      Either way, we end up with Xorg.bin, which is problematic for two reasons:
      * ps shows the command as Xorg.bin
      * _COMM and _EXE in systemd's journal will both show Xorg.bin as well
      
      There's not much we can do about the path, but having the actual command stay
      as Xorg means better compatibility to existing scripts. And, the reason for
      this path: the command
         journalctl _COMM=Xorg
      works universally, regardless of whether the wrapper is used or not.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      de89c6b8