diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-05-30 00:30:46 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2019-06-19 00:39:58 +0200 |
commit | 1a8de6352d068e0a45904cf9b80bde30561eca2f (patch) | |
tree | 8fab09d7f5572ba96aaa7713a692867a8f4d795d /nx-X11/programs/Xserver | |
parent | 3900ba3f8459c4822eaa6b8ac6035980a63fdfff (diff) | |
download | nx-libs-1a8de6352d068e0a45904cf9b80bde30561eca2f.tar.gz nx-libs-1a8de6352d068e0a45904cf9b80bde30561eca2f.tar.bz2 nx-libs-1a8de6352d068e0a45904cf9b80bde30561eca2f.zip |
dix/window.c: fix compiler warning
Window.c:3827:46: warning: array subscript 128 is above array bounds of ‘StoringPixmapRec *[128]’ {aka ‘struct <anonymous> *[128]’} [-Warray-bounds]
i, (void *) nxagentBSPixmapList[i]);
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index f602d0ed3..6758e0875 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -3938,16 +3938,16 @@ int nxagentEmptyBSPixmapList(void) StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) { - int i; - - for (i = 0; i < BSPIXMAPLIMIT; i++) + for (int i = 0; i < BSPIXMAPLIMIT; i++) { if ((nxagentBSPixmapList[i] != NULL) && (nxagentBSPixmapList[i] -> storingPixmapId == pixmapId)) { #ifdef TEST - fprintf(stderr, "nxagentFindItemBSPixmapList: pixmapId [%lu].\n", pixmapId); - fprintf(stderr, "nxagentFindItemBSPixmapList: nxagentBSPixmapList[%d] -> storingPixmapId [%lu].\n", + fprintf(stderr, "%s: pixmapId [%lu].\n", __func__, pixmapId); + fprintf(stderr, "%s: nxagentBSPixmapList[%d] = [%p].\n", __func__, + i, (void *) nxagentBSPixmapList[i]); + fprintf(stderr, "%s: nxagentBSPixmapList[%d] -> storingPixmapId [%lu].\n", __func__, i, nxagentBSPixmapList[i] -> storingPixmapId); #endif @@ -3955,15 +3955,13 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) } } - #ifdef TEST - fprintf(stderr, "nxagentFindItemBSPixmapList: WARNING! Item not found.\n"); + #ifdef WARNING + fprintf(stderr, "%s: WARNING! Item not found.\n", __func__); #endif #ifdef TEST - fprintf(stderr, "nxagentFindItemBSPixmapList: Pixmap with id [%lu] not found.\n", + fprintf(stderr, "%s: Pixmap with id [%lu] not found.\n", __func__, pixmapId); - fprintf(stderr, "nxagentBSPixmapList[%d] = [%p].\n", - i, (void *) nxagentBSPixmapList[i]); #endif return NULL; |