git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: daemon/do_debug: parameters aren't always unused
[libguestfs.git]
/
daemon
/
debug.c
diff --git
a/daemon/debug.c
b/daemon/debug.c
index
d6e469b
..
5083398
100644
(file)
--- a/
daemon/debug.c
+++ b/
daemon/debug.c
@@
-1,5
+1,5
@@
/* libguestfs - the guestfsd daemon
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-60,8
+60,14
@@
static struct cmd cmds[] = {
};
#endif
};
#endif
+#if ! ENABLE_DEBUG_COMMAND
+# define MAYBE_UNUSED ATTRIBUTE_UNUSED
+#else
+# define MAYBE_UNUSED /* empty */
+#endif
+
char *
char *
-do_debug (char *subcmd
, char **argv
)
+do_debug (char *subcmd
MAYBE_UNUSED, char **argv MAYBE_UNUSED
)
{
#if ENABLE_DEBUG_COMMAND
int argc, i;
{
#if ENABLE_DEBUG_COMMAND
int argc, i;
@@
-157,11
+163,11
@@
debug_fds (const char *subcmd, int argc, char *const *const argv)
if (S_ISLNK (statbuf.st_mode)) {
r = readlink (fname, link, sizeof link - 1);
if (r == -1) {
if (S_ISLNK (statbuf.st_mode)) {
r = readlink (fname, link, sizeof link - 1);
if (r == -1) {
- reply_with_perror ("readline: %s", fname);
- fclose (fp);
- free (out);
- closedir (dir);
- return NULL;
+
reply_with_perror ("readline: %s", fname);
+
fclose (fp);
+
free (out);
+
closedir (dir);
+
return NULL;
}
link[r] = '\0';
}
link[r] = '\0';