summaryrefslogtreecommitdiff
path: root/xlsclients.c
AgeCommit message (Collapse)Author
2022-10-24Resolve implicit conversion warnings from clangAlan Coopersmith
xlsclients.c:303:47: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] qt_reply = malloc(sizeof(*qt_reply) * cs->list_length); ~ ~~~~^~~~~~~~~~~ xlsclients.c:323:31: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] cs = malloc(sizeof(*cs) + child_count * (sizeof(*cs->prop_cookie) + sizeof(*cs->tree_cookie) + sizeof(*cs->win))); ^~~~~~~~~~~ ~ xlsclients.c:515:38: warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion] class_len = wm_class->value_len - name_len; ~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ xlsclients.c:515:40: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion] class_len = wm_class->value_len - name_len; ~ ^~~~~~~~ xlsclients.c:514:56: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] name_len = strnlen(res_name, wm_class->value_len) + 1; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ xlsclients.c:520:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] class_len = strlen(res_class); ~ ^~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-24usage: add cold & noreturn attributes to functionAlan Coopersmith
As suggested by clang: xlsclients.c:69:1: warning: function 'usage' could be declared with attribute 'noreturn' [-Wmissing-noreturn] { ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-24Handle -Wsign-compare warningsAlan Coopersmith
xlsclients.c: In function ‘show_client_properties’: xlsclients.c:485:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] 485 | for (i = 0; i < command->value_len && charsleft > 0; ) { | ^ xlsclients.c:488:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] 488 | if (i < command->value_len && charsleft > 0) { | ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-24Quiet -Wmaybe-uninitialized warnings from gccAlan Coopersmith
I think these were false positives, as the accesses were all inside "if (cs->verbose)" checks, matching the initialization case for them, but this makes gcc stop warning. xlsclients.c:531:13: warning: ‘wm_class’ may be used uninitialized [-Wmaybe-uninitialized] 531 | free(wm_class); | ^~~~~~~~~~~~~~ xlsclients.c:440:31: note: ‘wm_class’ was declared here 440 | xcb_get_property_reply_t *wm_class; | ^~~~~~~~ xlsclients.c:475:35: warning: ‘icon_name’ may be used uninitialized [-Wmaybe-uninitialized] 475 | if (icon_name && icon_name->type) | ~~~~~~~~~^~~~~~ xlsclients.c:439:31: note: ‘icon_name’ was declared here 439 | xcb_get_property_reply_t *icon_name; | ^~~~~~~~~ xlsclients.c:527:13: warning: ‘name’ may be used uninitialized [-Wmaybe-uninitialized] 527 | free(name); | ^~~~~~~~~~ xlsclients.c:438:31: note: ‘name’ was declared here 438 | xcb_get_property_reply_t *name; | ^~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-31Print which option was in error along with usage messageAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-19Fix deconstification warnings from gccAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-19Add -version flag to print version from PACKAGE_STRINGAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-22Give unique names to the two reply variables in child_infoAlan Coopersmith
Clears compiler warnings: xlsclients.c:253:28: warning: declaration shadows a local variable [-Wshadow] xcb_get_property_reply_t *reply; ^ xlsclients.c:250:30: note: previous declaration is here xcb_query_tree_reply_t **reply; Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-03-13Drop dependency on xcb-atom/xcb-utilDan Nicholson
With commit 223851b6, the atom names from xcb/xproto.h are being used and xcb-atom is no longer needed. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2011-03-07Use XCB_ATOM_* atom names rather than deprecated atom namesJon TURNEY
Those deprecated atom names were removed from xcb/util in commit 2f0334b3eb49fa3a0d6daf6b9dde10e480a5c59f Found by tinderbox, see: http://tinderbox.freedesktop.org/builds/2011-03-06-0008/logs/xlsclients/#build http://tinderbox.freedesktop.org/builds/2011-03-07-0001/logs/xlsclients/#build Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Harris <pharris@opentext.com>
2009-10-21Fix check for xcb_connect failureAlan Coopersmith
Prevents core dump when display can't be opened Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-10-21Use inttypes.h for correct printf formatsYaakov Selkowitz
xcb_atom_t and xcb_window_t are both typedef'd as uint32_t. Since PRI*32 are a C99 feature that may not be available, fallbacks are provided based on the assumption of a 32-bit int. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jamey Sharp <jamey@minilop.net>
2009-10-20Add implementation of strnlen for systems without this functionJeremy Huddleston
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-10-19Rewrite xlsclients to use XCB, avoiding many (many) round tripsPeter Harris
This version spends bandwidth to reduce latency; in particular, it aggressively calls query_tree before the answer to get_property(WM_STATE) is available. Even on my local box, this version is 4-10 times faster (30ms typical, vs 200ms typical for Xlib). I get similar results over the local network. At least one person reports this version takes less than 2 seconds over ssh, vs over a minute for the Xlib version (~30x faster). Reviewed-by: Jamey Sharp <jamey@minilop.net>
2009-01-22Correct make distcheck and sparse warnings.Paulo Cesar Pereira de Andrade
2004-04-23Merging XORG-CURRENT into trunkxprint_packagertest_20041217_basexprint_packagertest_20041125_basesco_port_update-baserel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_99_903XORG-6_8_99_902XORG-6_8_99_901XORG-6_8_99_900XORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_16XORG-6_8_99_15XORG-6_8_99_14XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1XORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1XACE-SELINUX-MERGExprint_packagertest_20041217xprint_packagertest_20041125sco_port_updatelg3d-masterlg3d-eventlg3d-dev-0-7-1lg3d-dev-0-7-0lg3d-dev-0-6-latestlg3d-dev-0-6-2lg3d-dev-0-6-1-latestlg3d-dev-0-6-1-currentlg3d-dev-0-6-1-1lg3d-dev-0-6-1lg3dXORG-6_8-branchCOMPOSITEWRAPEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2003-11-14XFree86 4.3.0.1xf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-4_3_0_1xf86-012804-2330PRE_xf86-4_3_0_1Kaleb Keithley
2003-11-14R6.6 is the Xorg base-lineXORG-MAINXORG-STABLEKaleb Keithley