diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2023-01-22 10:57:30 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2023-01-22 10:57:30 +0000 |
commit | 050c8d69d16d0af8b9014a76ec2dd45f16d89cf6 (patch) | |
tree | b066bcde2a4877d26cedd6a8b35de8cb25a5e245 /app | |
parent | 752c24e938ca85e2109026cdaa3a6af1d84974e8 (diff) |
Update xlsatoms to version 1.1.4
Diffstat (limited to 'app')
-rw-r--r-- | app/xlsatoms/ChangeLog | 74 | ||||
-rw-r--r-- | app/xlsatoms/Makefile.in | 7 | ||||
-rw-r--r-- | app/xlsatoms/aclocal.m4 | 16 | ||||
-rw-r--r-- | app/xlsatoms/compile | 17 | ||||
-rw-r--r-- | app/xlsatoms/configure | 52 | ||||
-rw-r--r-- | app/xlsatoms/configure.ac | 6 | ||||
-rw-r--r-- | app/xlsatoms/man/Makefile.in | 1 | ||||
-rw-r--r-- | app/xlsatoms/xlsatoms.c | 25 |
8 files changed, 147 insertions, 51 deletions
diff --git a/app/xlsatoms/ChangeLog b/app/xlsatoms/ChangeLog index 721c7b236..cd40e57eb 100644 --- a/app/xlsatoms/ChangeLog +++ b/app/xlsatoms/ChangeLog @@ -1,3 +1,75 @@ +commit 28439223c8bafa32dc64504134e0a5fd8d2d16a3 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Nov 13 09:29:10 2022 -0800 + + xlsatoms 1.1.4 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit ab1dce3cee49f0c497b158a2a2dd3412d531e154 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Oct 22 13:09:18 2022 -0700 + + usage: add cold & noreturn attributes to function + + As suggested by clang: + xlsatoms.c:56:1: warning: function 'usage' could be declared with + attribute 'noreturn' [-Wmissing-noreturn] + { + ^ + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 41975db12f73a6f23d111c3e31b4f3a14ea88b68 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Oct 22 13:03:14 2022 -0700 + + Resolve clang -Wshorten-64-to-32 warnings + + xlsatoms.c:175:13: warning: implicit conversion loses integer precision: + 'long long' to 'xcb_atom_t' (aka 'unsigned int') [-Wshorten-64-to-32] + *atom = value; + ~ ^~~~~ + + xlsatoms.c:244:37: warning: implicit conversion loses integer precision: + 'long' to 'xcb_atom_t' (aka 'unsigned int') [-Wshorten-64-to-32] + cookie[i] = xcb_get_atom_name(c, i + low); + ~~~~~~~~~~~~~~~~~ ~~^~~~~ + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 4265e8b5e6d363b5bef1fb217012eb4aee65a0cd +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Oct 22 12:38:30 2022 -0700 + + Variable scope reductions as suggested by cppcheck + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit fd33460f430cf043e9610847974b9b3892d57595 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jul 28 17:30:21 2022 -0700 + + gitlab CI: stop requiring Signed-off-by in commits + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit c528ce16f323974bb2ab60543e37f2ca5f76128c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Dec 6 15:26:29 2021 -0800 + + Build xz tarballs instead of bzip2 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit b097e523402f9a7742e609ff57fef6fec58439f9 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Dec 6 15:26:24 2021 -0800 + + gitlab CI: add a basic build test + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit 90e2f5a00d304c8b344f42a72b4543f6e4fd4cd6 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue Feb 19 15:27:23 2019 -0800 @@ -572,7 +644,7 @@ Date: Wed Jul 20 19:32:01 2005 +0000 configure cache, you cache it, and the cached value is probably wrong. commit 0dd5d7bf6f87df04b4d83ba5cc9356c6eed71088 -Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Jul 5 22:51:10 2005 +0000 Add build systems for xlogo, xlsatoms, xlsclients, xmag, xman, xmessage, diff --git a/app/xlsatoms/Makefile.in b/app/xlsatoms/Makefile.in index 0d7929320..e16bd6f49 100644 --- a/app/xlsatoms/Makefile.in +++ b/app/xlsatoms/Makefile.in @@ -179,9 +179,9 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best -DIST_TARGETS = dist-bzip2 dist-gzip +DIST_TARGETS = dist-xz dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -299,6 +299,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -641,6 +642,7 @@ distdir: $(DISTFILES) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) + dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) @@ -648,7 +650,6 @@ dist-bzip2: distdir dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) - dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) diff --git a/app/xlsatoms/aclocal.m4 b/app/xlsatoms/aclocal.m4 index 2a518c4b6..d0a818e1e 100644 --- a/app/xlsatoms/aclocal.m4 +++ b/app/xlsatoms/aclocal.m4 @@ -19,9 +19,9 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) + dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl @@ -62,7 +62,7 @@ dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) +[m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -163,7 +163,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -173,11 +173,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -194,7 +194,7 @@ installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full diff --git a/app/xlsatoms/compile b/app/xlsatoms/compile index a85b723c7..df363c8fb 100644 --- a/app/xlsatoms/compile +++ b/app/xlsatoms/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/app/xlsatoms/configure b/app/xlsatoms/configure index f397eb19e..7088e314b 100644 --- a/app/xlsatoms/configure +++ b/app/xlsatoms/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xlsatoms 1.1.3. +# Generated by GNU Autoconf 2.69 for xlsatoms 1.1.4. # -# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xlsatoms/issues>. +# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xlsatoms/-/issues>. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -267,7 +267,7 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://gitlab.freedesktop.org/xorg/app/xlsatoms/issues +$0: https://gitlab.freedesktop.org/xorg/app/xlsatoms/-/issues $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -581,9 +581,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xlsatoms' PACKAGE_TARNAME='xlsatoms' -PACKAGE_VERSION='1.1.3' -PACKAGE_STRING='xlsatoms 1.1.3' -PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xlsatoms/issues' +PACKAGE_VERSION='1.1.4' +PACKAGE_STRING='xlsatoms 1.1.4' +PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xlsatoms/-/issues' PACKAGE_URL='' ac_unique_file="Makefile.am" @@ -729,6 +729,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -809,6 +810,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1061,6 +1063,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1198,7 +1209,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1311,7 +1322,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xlsatoms 1.1.3 to adapt to many kinds of systems. +\`configure' configures xlsatoms 1.1.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1351,6 +1362,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1381,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xlsatoms 1.1.3:";; + short | recursive ) echo "Configuration of xlsatoms 1.1.4:";; esac cat <<\_ACEOF @@ -1427,7 +1439,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to <https://gitlab.freedesktop.org/xorg/app/xlsatoms/issues>. +Report bugs to <https://gitlab.freedesktop.org/xorg/app/xlsatoms/-/issues>. _ACEOF ac_status=$? fi @@ -1490,7 +1502,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xlsatoms configure 1.1.3 +xlsatoms configure 1.1.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1747,7 +1759,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xlsatoms $as_me 1.1.3, which was +It was created by xlsatoms $as_me 1.1.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2576,7 +2588,7 @@ fi # Define the identity of the package. PACKAGE='xlsatoms' - VERSION='1.1.3' + VERSION='1.1.4' cat >>confdefs.h <<_ACEOF @@ -10401,8 +10413,8 @@ AM_BACKSLASH='\' # Checks for pkg-config packages pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLSATOMS" >&5 -$as_echo_n "checking for XLSATOMS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xcb" >&5 +$as_echo_n "checking for xcb... " >&6; } if test -n "$XLSATOMS_CFLAGS"; then pkg_cv_XLSATOMS_CFLAGS="$XLSATOMS_CFLAGS" @@ -10442,7 +10454,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -10469,7 +10481,7 @@ Alternatively, you may set the environment variables XLSATOMS_CFLAGS and XLSATOMS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -11027,7 +11039,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xlsatoms $as_me 1.1.3, which was +This file was extended by xlsatoms $as_me 1.1.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11087,13 +11099,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to <https://gitlab.freedesktop.org/xorg/app/xlsatoms/issues>." +Report bugs to <https://gitlab.freedesktop.org/xorg/app/xlsatoms/-/issues>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xlsatoms config.status 1.1.3 +xlsatoms config.status 1.1.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/app/xlsatoms/configure.ac b/app/xlsatoms/configure.ac index 4e268fd55..5c4672ffe 100644 --- a/app/xlsatoms/configure.ac +++ b/app/xlsatoms/configure.ac @@ -23,14 +23,14 @@ dnl Process this file with autoconf to create configure. # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT(xlsatoms, [1.1.3], - [https://gitlab.freedesktop.org/xorg/app/xlsatoms/issues], +AC_INIT(xlsatoms, [1.1.4], + [https://gitlab.freedesktop.org/xorg/app/xlsatoms/-/issues], xlsatoms) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) # Initialize Automake -AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_INIT_AUTOMAKE([foreign dist-xz]) # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], diff --git a/app/xlsatoms/man/Makefile.in b/app/xlsatoms/man/Makefile.in index 67dc7c5c7..076fa0aff 100644 --- a/app/xlsatoms/man/Makefile.in +++ b/app/xlsatoms/man/Makefile.in @@ -222,6 +222,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/app/xlsatoms/xlsatoms.c b/app/xlsatoms/xlsatoms.c index a9719018c..1dbe1e927 100644 --- a/app/xlsatoms/xlsatoms.c +++ b/app/xlsatoms/xlsatoms.c @@ -51,7 +51,17 @@ static void do_range ( xcb_connection_t *c, const char *format, char *range ); static void list_atoms ( xcb_connection_t *c, const char *format, int mask, xcb_atom_t low, xcb_atom_t high ); -static void +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with older compilers. */ +#endif + +static void +#if __has_attribute(__cold__) +__attribute__((__cold__)) +#endif +#if __has_attribute(noreturn) +__attribute__((noreturn)) +#endif usage(const char *errmsg) { if (errmsg != NULL) @@ -73,14 +83,13 @@ main(int argc, char *argv[]) { char *displayname = NULL; const char *format = "%lu\t%s"; - int i, doit; int didit = 0; xcb_connection_t *c = NULL; ProgramName = argv[0]; - for (doit = 0; doit < 2; doit++) { /* pre-parse to get display */ - for (i = 1; i < argc; i++) { + for (int doit = 0; doit < 2; doit++) { /* pre-parse to get display */ + for (int i = 1; i < argc; i++) { char *arg = argv[i]; if (arg[0] == '-') { @@ -173,7 +182,7 @@ strtoatom(char *s, xcb_atom_t *atom) return 1; } - *atom = value; + *atom = (xcb_atom_t) value; return 0; } @@ -242,7 +251,7 @@ say_batch(xcb_connection_t *c, const char *format, xcb_get_atom_name_cookie_t *c int done = 0; for (i = 0; i < count; i++) - cookie[i] = xcb_get_atom_name(c, i + low); + cookie[i] = xcb_get_atom_name(c, (xcb_atom_t)i + low); for (i = 0; i < count; i++) { xcb_get_atom_name_reply_t *r; @@ -273,7 +282,6 @@ list_atoms(xcb_connection_t *c, const char *format, int mask, xcb_atom_t low, xc { xcb_get_atom_name_cookie_t cookie_jar[ATOMS_PER_BATCH]; int done = 0; - long count; if ((mask & RangeLow) == 0) low = 1; @@ -281,7 +289,8 @@ list_atoms(xcb_connection_t *c, const char *format, int mask, xcb_atom_t low, xc high = UINT32_MAX; while (!done) { - count = high - low < ATOMS_PER_BATCH - 1 ? high - low + 1 : ATOMS_PER_BATCH; + long count = (high - low < ATOMS_PER_BATCH - 1) ? + (high - low + 1) : ATOMS_PER_BATCH; done = say_batch(c, format, cookie_jar, low, count, (mask & RangeHigh) == 0); if (high - low < UINT32_MAX && low == high - count + 1) { done = 1; |