Age | Commit message (Collapse) | Author |
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Xauth.h includes headers provided by xproto. So add for test
also the dependency.
|
|
POSIX.2 sed(1) doesn't allow file to be anywhere else than, if given,
last. Allow to use whatever compliant sed(1) is there, not only GNU
sed(1).
|
|
explicit_bzero(3) is not provided by every system, and some provide
explicit_memset(3) that is in the process of being standardized
(furthermore, POSIX deprecates bzero(3) since memset(3) can do
same or more).
|
|
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Clang also supports the malloc attribute but unlike GCC does not accept
the deallocator argument. This has been reported as
https://github.com/llvm/llvm-project/issues/51607
Signed-off-by: Alex Richardson <arichardson@FreeBSD.org>
|
|
May aid in static analysis by gcc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
This is, I think, equal to the autotools build-system in every practical
way. The man pages have hardcoded numbers. I think this is okay, as all
modern operating systems seem to use the same man page numbering now.
I've also chosen to not generate a config.h file with Meson. This makes
using libXau as a subproject safer, since we don't have to worry about
conflicting config.h files, plus there are only a couple of declarations
that are actually used. This also saves some configure time in writing
out an additional file.
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Oracle no longer includes this term in our copyright & license notices.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.
configure.ac:35: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:35: You should run autoupdate.
aclocal.m4:11889: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:35: the top level
configure.ac:35: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:35: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:11889: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:35: the top level
configure.ac:36: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:36: You should run autoupdate.
aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from...
configure.ac:36: the top level
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
These are not needed in C89 and later.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Autest.c: In function ‘main’:
Autest.c:38:21: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
38 | char *name = "XAU-TEST-1";
| ^~~~~~~~~~~~
Autest.c:39:21: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
39 | char *data = "Do not begin the test until instructed to do so.";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Autest.c:57:23: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
57 | test_data.address = "";
| ^
Autest.c:59:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
59 | test_data.number = "";
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by using:
codespell --builtin clear,rare,usage,informal,names
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Optimizing compilers may remove the bzero call because it is followed
by free. The function explicit_bzero avoids this optimization. Use it
if it is available.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
this removes simply unneeded code from XauReadAuth
Signed-off-by: Walter Harms <wharms@bfs.de>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
remove redundant null check on calling free()
Signed-off-by: Walter Harms <wharms@bfs.de>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
redundant null check on auth->address calling free()
redundant null check on auth->number calling free()
redundant null check on auth->name calling free()
Signed-off-by: Walter Harms <wharms@bfs.de>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
If the environment variable HOME is empty, XauFileName triggers an
out of boundary read access (name[1]). If HOME consists of a single
character relative path, the output becomes unexpected, because
"HOME=a" leads to "a.Xauthority" instead of "a/.Xauthority". Granted,
a relative HOME path leads to trouble in general, the code should
properly return "a/.Xauthority" nonetheless.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
|
|
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
fall-outs, when they contain space.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Syncs the invocation of configure with the one from the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
AuFileName.c:72:8: warning: Call to 'malloc' has an allocation size of 0 bytes
buf = malloc (size);
^~~~~~~~~~~~~
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=69929
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
In normal cases, no difference. If someone has accidentally created
a directory with those names, this can save you from needing to fsck
to clean it up on some filesystems (like UFS).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Stops casting len parameters to int in callers so that this change
doesn't introduce warnings that we're taking unsigned values, casting
them to signed, then passing to a function that wants them unsigned.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Drops fallback prototype of sleep() for non-POSIX, non-Windows systems
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
http://people.gnome.org/~walters/docs/build-api.txt
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
We can't clean it up without breaking ABI, so disable the warnings for it:
./include/X11/Xauth.h:33:19: warning: padding struct 'struct xauth' with 4 bytes to align 'address' [-Wpadded]
char *address;
^
./include/X11/Xauth.h:35:19: warning: padding struct 'struct xauth' with 6 bytes to align 'number' [-Wpadded]
char *number;
^
./include/X11/Xauth.h:37:19: warning: padding struct 'struct xauth' with 6 bytes to align 'name' [-Wpadded]
char *name;
^
./include/X11/Xauth.h:39:18: warning: padding struct 'struct xauth' with 6 bytes to align 'data' [-Wpadded]
char *data;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
fread & fwrite are defined as taking size_t arguments (an unsigned type),
so stop casting their arguments to a signed int just to confuse things.
Fixes warnings:
AuFileName.c:69:59: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
AuRead.c:58:44: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (fread (data, (int) sizeof (char), (int) len, file) != len) {
~~~~~ ^~~~~~~~~
AuWrite.c:49:46: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (fwrite (string, (int) sizeof (char), (int) count, file) != count)
~~~~~~ ^~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
XauFileName() may allocate and return a static buffer. The only
way to ensure it is freed is to deallocate it when the program exits.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
EEXIST is a perfectly normal and expected errno for open(O_CREAT |
O_EXCL), and is a signal to loop around and retry, not return with an
error.
Signed-off-by: Matthew D. Fuller <fullermd@over-yonder.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|