Age | Commit message (Collapse) | Author |
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
Needed for builds on NetBSD to work correctly, since it depends on
AC_USE_SYSTEM_EXTENSIONS defining _OPENBSD_SOURCE to expose the
prototype for reallocarray() in the system headers.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
makedepend is rather early in the distro bootstrap chain, so it shouldn't pull
in anything it doesn't really need.
xproto is only pulled in for two macros which we can just as easily provide
ourselves.
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Also correct comments on hand-coded custom strcmp() replacements
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Avoid having to make an additional system call for every time
we compare full path names.
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>
|
|
Eliminates clang warnings:
cppsetup.c:41:30: warning: cast from 'char *' to 'struct _parse_data *'
increases required alignment from 1 to 8 [-Wcast-align]
struct _parse_data *pd = (struct _parse_data *) ip->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cppsetup.c:69:30: warning: cast from 'char *' to 'struct _parse_data *'
increases required alignment from 1 to 8 [-Wcast-align]
struct _parse_data *pd = (struct _parse_data *) ip->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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>
|
|
As warned by cppcheck:
pr.c:83:9: style: Redundant initialization for 'tmp'. The initialized
value is overwritten before it is read. [redundantInitialization]
tmp = input;
^
pr.c:74:21: note: tmp is initialized
const char *tmp = input;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Clears gcc warning:
parse.c: In function ‘find_includes’:
parse.c:620:29: warning: declaration of ‘inclistp’ shadows a global declaration [-Wshadow]
struct inclist *inclistp = inclistnext;
^~~~~~~~
In file included from parse.c:27:0:
def.h:171:26: note: shadowed declaration is here
extern struct inclist *inclistp;
^~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Clears up 28 -Wdiscarded-qualifiers warnings from gcc
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>
|
|
Make indentation and formatting much more consistent across this project
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Refactor code to find the full file path before comparing against
existing items in the list so that we stop adding duplicate entries
for all the files in the system include path and with larger amounts
of code hitting the MAXFILES limit.
Fixes: 3dc64b0 ("Add test case for bug #1 + proposed fix.")
Closes: #2
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>
|
|
configure.ac:32: warning: AC_OUTPUT should be used without arguments.
configure.ac:32: You should run autoupdate.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Fixes: https://gitlab.freedesktop.org/xorg/util/makedepend/issues/1
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by Oracle Parfait:
Error: File Leak
File Leak [file-ptr-leak]:
Leaked File fdin
at line 799 of main.c in function 'redirect'.
fdin initialized at line 769 with fopen
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>
|
|
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>
|
|
Instead of writing everything to a temporary buffer, and then using
fwrite() to have it fputc() one character at a time into the stdio
buffer, just use fprintf() directly to save a copy and write in
larger blocks.
Testing on Solaris on makedepend's own source files showed a
reduction in memcpy's from 4037 to 3108, and in _dowrite calls
in stdio from 1173 to 168, but no change in actual write calls
from stdio's buffer to the file.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Use of it was removed in commit 275c17136006f9d, but we kept setting
it anyway.
Resolves gcc 7.3 warning:
main.c: In function ‘getnextline’:
main.c:587:10: warning: variable ‘whitespace’ set but not used [-Wunused-but-set-variable]
boolean whitespace = FALSE;
^~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
ifparser.c: In function ‘parse_product’:
ifparser.c:300:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
else
^~~~
ifparser.c:302:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
break;
^~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Makefile doesn't like colons in filenames/paths so they must
be quoted in the output. Otherwise makedepend doesn't work with
full paths that contain a colon.
V2: Use quoted filename when measuring name length
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Clearly a limit of 64 -I flags is too low (we hit it); it might be
a good style recommendation but shouldn't be a hard limit.
512 is a fairly random replacement value.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
When assigning source code files from the command line to the fp pointer,
no bounds check is done and if more than MAXFILES file names are specified
on the command line, memory will be overridden out of bounds.
https://bugs.freedesktop.org/show_bug.cgi?id=94099
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-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>
|
|
Cleans up several -Wempty-body warnings from gcc 5.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Avoid dereferencing argv[argc].
See http://www.forallsecure.com/bug-reports/011f1a55f79a5501b36008d6ee0d40e8b6644569/
Reported-by: Alexandre Rebert <alexandre@cmu.edu>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Drops use of autoconf's obsolete AC_TYPE_SIGNAL
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Use memmove for potentially overlapping copies.
Reported-by: Laurence Jupp <laurence@narya.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
Fixes clang warnings about converting back & forth:
main.c:761:8: warning: implicit conversion loses integer precision: 'size_t'
(aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
len = strlen(line);
~ ^~~~~~~~~~~~
main.c:763:41: warning: implicit conversion changes signedness: 'int' to
'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (*buf == '#' && strncmp(line, buf, len) == 0)
~~~~~~~ ^~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html
- Support for the long-deprecated INCLUDES variable will be removed
altogether in Automake 1.14. The AM_CPPFLAGS variable should be
used instead.
This variable was deprecated in Automake releases prior to 1.10, which is
the current minimum level required to build X.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
Patch v1: https://bugs.freedesktop.org/attachment.cgi?id=64218
v2: modified by Alan Coopersmith to restore Makefile to original name
if contents cannot be read, instead of leaving it moved to .bak name.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|