diff options
author | marha <marha@users.sourceforge.net> | 2014-01-26 20:19:23 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-26 20:19:23 +0100 |
commit | 5f455179ae4b279a82d99a7a3dabe61f58c42ad6 (patch) | |
tree | fdecec022cf1b8b782b90a64c14e374fa6d400cb /xorg-server/test | |
parent | 78d84bd03c744b0ed420c450dd2807904ccaef21 (diff) | |
parent | 30af30b78075159fce477ae99cc72540133714d0 (diff) | |
download | vcxsrv-5f455179ae4b279a82d99a7a3dabe61f58c42ad6.tar.gz vcxsrv-5f455179ae4b279a82d99a7a3dabe61f58c42ad6.tar.bz2 vcxsrv-5f455179ae4b279a82d99a7a3dabe61f58c42ad6.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver randrproto libxtrans fontconfig libxcb xcb-proto mesa git update 26 Jan 2014
Conflicts:
X11/xtrans/Xtrans.c
xorg-server/dix/dispatch.c
xorg-server/os/xdmcp.c
Diffstat (limited to 'xorg-server/test')
-rw-r--r-- | xorg-server/test/hashtabletest.c | 6 | ||||
-rw-r--r-- | xorg-server/test/signal-logging.c | 7 | ||||
-rw-r--r-- | xorg-server/test/xi2/protocol-common.c | 66 | ||||
-rw-r--r-- | xorg-server/test/xi2/protocol-common.h | 2 | ||||
-rw-r--r-- | xorg-server/test/xi2/protocol-xipassivegrabdevice.c | 8 | ||||
-rw-r--r-- | xorg-server/test/xi2/protocol-xiquerydevice.c | 2 | ||||
-rw-r--r-- | xorg-server/test/xi2/protocol-xiqueryversion.c | 4 |
7 files changed, 48 insertions, 47 deletions
diff --git a/xorg-server/test/hashtabletest.c b/xorg-server/test/hashtabletest.c index 6af14a8e6..ceadfa7a3 100644 --- a/xorg-server/test/hashtabletest.c +++ b/xorg-server/test/hashtabletest.c @@ -26,7 +26,6 @@ static int test1(void) { HashTable h; - XID id; int c; int ok = 1; const int numKeys = 420; @@ -36,7 +35,7 @@ test1(void) for (c = 0; c < numKeys; ++c) { int *dest; - id = c; + XID id = c; dest = ht_add(h, &id); if (dest) { *dest = 2 * c; @@ -85,7 +84,6 @@ static int test2(void) { HashTable h; - XID id; int c; int ok = 1; const int numKeys = 420; @@ -94,7 +92,7 @@ test2(void) h = ht_create(sizeof(XID), 0, ht_resourceid_hash, ht_resourceid_compare, NULL); for (c = 0; c < numKeys; ++c) { - id = c; + XID id = c; ht_add(h, &id); } diff --git a/xorg-server/test/signal-logging.c b/xorg-server/test/signal-logging.c index 7bbd9105e..d894373f0 100644 --- a/xorg-server/test/signal-logging.c +++ b/xorg-server/test/signal-logging.c @@ -117,6 +117,8 @@ static void number_formatting(void) { int i; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverflow" long unsigned int unsigned_tests[] = { 0,/* Zero */ 5, /* Single digit number */ 12, /* Two digit decimal number */ @@ -139,6 +141,7 @@ number_formatting(void) -0x15D027BF211B37A, /* Large > 32 bit number */ -0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */ } ; +#pragma GCC diagnostic pop for (i = 0; i < sizeof(unsigned_tests) / sizeof(unsigned_tests[0]); i++) assert(check_number_format_test(unsigned_tests[i])); @@ -152,6 +155,8 @@ number_formatting(void) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" +#pragma GCC diagnostic ignored "-Wformat" +#pragma GCC diagnostic ignored "-Wformat-extra-args" static void logging_format(void) { const char *log_file_path = "/tmp/Xorg-logging-test.log"; @@ -220,14 +225,12 @@ static void logging_format(void) assert(strcmp(logmsg, "(EE) substituted string\n") == 0); /* Invalid format */ -#warning Ignore compiler warning below "lacks type at end of format". This is intentional. LogMessageVerbSigSafe(X_ERROR, -1, "%4", 4); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) ") == 0); LogMessageVerbSigSafe(X_ERROR, -1, "\n"); fseek(f, 0, SEEK_END); -#warning Ignore compiler warning below "unknown conversion type character". This is intentional. /* %hld is bogus */ LogMessageVerbSigSafe(X_ERROR, -1, "%hld\n", 4); read_log_msg(logmsg); diff --git a/xorg-server/test/xi2/protocol-common.c b/xorg-server/test/xi2/protocol-common.c index e171115d3..9a429e49f 100644 --- a/xorg-server/test/xi2/protocol-common.c +++ b/xorg-server/test/xi2/protocol-common.c @@ -41,7 +41,7 @@ WindowRec root; WindowRec window; static ClientRec server_client; -void *userdata; +void *global_userdata; static void fake_init_sprite(DeviceIntPtr dev) @@ -136,34 +136,34 @@ struct devices init_devices(void) { ClientRec client; - struct devices devices; + struct devices local_devices; client = init_client(0, NULL); - AllocDevicePair(&client, "Virtual core", &devices.vcp, &devices.vck, + AllocDevicePair(&client, "Virtual core", &local_devices.vcp, &local_devices.vck, CorePointerProc, CoreKeyboardProc, TRUE); - inputInfo.pointer = devices.vcp; + inputInfo.pointer = local_devices.vcp; - inputInfo.keyboard = devices.vck; - ActivateDevice(devices.vcp, FALSE); - ActivateDevice(devices.vck, FALSE); - EnableDevice(devices.vcp, FALSE); - EnableDevice(devices.vck, FALSE); + inputInfo.keyboard = local_devices.vck; + ActivateDevice(local_devices.vcp, FALSE); + ActivateDevice(local_devices.vck, FALSE); + EnableDevice(local_devices.vcp, FALSE); + EnableDevice(local_devices.vck, FALSE); - AllocDevicePair(&client, "", &devices.mouse, &devices.kbd, + AllocDevicePair(&client, "", &local_devices.mouse, &local_devices.kbd, TestPointerProc, CoreKeyboardProc, FALSE); - ActivateDevice(devices.mouse, FALSE); - ActivateDevice(devices.kbd, FALSE); - EnableDevice(devices.mouse, FALSE); - EnableDevice(devices.kbd, FALSE); + ActivateDevice(local_devices.mouse, FALSE); + ActivateDevice(local_devices.kbd, FALSE); + EnableDevice(local_devices.mouse, FALSE); + EnableDevice(local_devices.kbd, FALSE); - devices.num_devices = 4; - devices.num_master_devices = 2; + local_devices.num_devices = 4; + local_devices.num_master_devices = 2; - fake_init_sprite(devices.mouse); - fake_init_sprite(devices.vcp); + fake_init_sprite(local_devices.mouse); + fake_init_sprite(local_devices.vcp); - return devices; + return local_devices; } /* Create minimal client, with the given buffer and len as request buffer */ @@ -187,20 +187,20 @@ init_client(int len, void *data) } void -init_window(WindowPtr window, WindowPtr parent, int id) +init_window(WindowPtr local_window, WindowPtr parent, int id) { - memset(window, 0, sizeof(*window)); + memset(local_window, 0, sizeof(*local_window)); - window->drawable.id = id; + local_window->drawable.id = id; if (parent) { - window->drawable.x = 30; - window->drawable.y = 50; - window->drawable.width = 100; - window->drawable.height = 200; + local_window->drawable.x = 30; + local_window->drawable.y = 50; + local_window->drawable.width = 100; + local_window->drawable.height = 200; } - window->parent = parent; - window->optional = calloc(1, sizeof(WindowOptRec)); - assert(window->optional); + local_window->parent = parent; + local_window->optional = calloc(1, sizeof(WindowOptRec)); + assert(local_window->optional); } extern DevPrivateKeyRec miPointerScreenKeyRec; @@ -208,18 +208,18 @@ extern DevPrivateKeyRec miPointerPrivKeyRec; /* Needed for the screen setup, otherwise we crash during sprite initialization */ static Bool -device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) +device_cursor_init(DeviceIntPtr dev, ScreenPtr local_screen) { return TRUE; } static void -device_cursor_cleanup(DeviceIntPtr dev, ScreenPtr screen) +device_cursor_cleanup(DeviceIntPtr dev, ScreenPtr local_screen) { } static Bool -set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) +set_cursor_pos(DeviceIntPtr dev, ScreenPtr local_screen, int x, int y, Bool event) { return TRUE; } @@ -264,5 +264,5 @@ __wrap_WriteToClient(ClientPtr client, int len, void *data) { assert(reply_handler != NULL); - (*reply_handler) (client, len, data, userdata); + (*reply_handler) (client, len, data, global_userdata); } diff --git a/xorg-server/test/xi2/protocol-common.h b/xorg-server/test/xi2/protocol-common.h index d30306886..f8504787f 100644 --- a/xorg-server/test/xi2/protocol-common.h +++ b/xorg-server/test/xi2/protocol-common.h @@ -91,7 +91,7 @@ extern struct devices devices; /** * test-specific userdata, passed into the reply handler. */ -extern void *userdata; +extern void *global_userdata; /** * The reply handler called from WriteToClient. Set this handler if you need diff --git a/xorg-server/test/xi2/protocol-xipassivegrabdevice.c b/xorg-server/test/xi2/protocol-xipassivegrabdevice.c index 84b386bf3..1e2341eb7 100644 --- a/xorg-server/test/xi2/protocol-xipassivegrabdevice.c +++ b/xorg-server/test/xi2/protocol-xipassivegrabdevice.c @@ -136,7 +136,7 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req, int error, int errval) { int rc; - int modifiers; + int local_modifiers; rc = ProcXIPassiveGrabDevice(&client_request); assert(rc == error); @@ -151,12 +151,12 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req, swapl(&req->cursor); swapl(&req->detail); swaps(&req->deviceid); - modifiers = req->num_modifiers; + local_modifiers = req->num_modifiers; swaps(&req->num_modifiers); swaps(&req->mask_len); - while (modifiers--) { - CARD32 *mod = ((CARD32 *) (req + 1)) + modifiers; + while (local_modifiers--) { + CARD32 *mod = ((CARD32 *) (req + 1)) + local_modifiers; swapl(mod); } diff --git a/xorg-server/test/xi2/protocol-xiquerydevice.c b/xorg-server/test/xi2/protocol-xiquerydevice.c index c066daa35..deef1f180 100644 --- a/xorg-server/test/xi2/protocol-xiquerydevice.c +++ b/xorg-server/test/xi2/protocol-xiquerydevice.c @@ -312,7 +312,7 @@ test_XIQueryDevice(void) struct test_data data; reply_handler = reply_XIQueryDevice; - userdata = &data; + global_userdata = &data; request_init(&request, XIQueryDevice); printf("Testing XIAllDevices.\n"); diff --git a/xorg-server/test/xi2/protocol-xiqueryversion.c b/xorg-server/test/xi2/protocol-xiqueryversion.c index ed75c89db..3749b3041 100644 --- a/xorg-server/test/xi2/protocol-xiqueryversion.c +++ b/xorg-server/test/xi2/protocol-xiqueryversion.c @@ -113,7 +113,7 @@ request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int error) request_init(&request, XIQueryVersion); client = init_client(request.length, &request); - userdata = (void *) &versions; + global_userdata = (void *) &versions; /* Change the server to support smaj.smin */ XIVersion.major_version = smaj; @@ -206,7 +206,7 @@ test_XIQueryVersion_multiple(void) XIVersion.minor_version = 2; reply_handler = reply_XIQueryVersion_multiple; - userdata = (void *) &versions; + global_userdata = (void *) &versions; /* run 1 */ |