80 lines
2.3 KiB
Diff
80 lines
2.3 KiB
Diff
attr/attr.c | 10 ++++++++--
|
|
getfattr/getfattr.c | 6 ++++--
|
|
libmisc/quote.c | 1 +
|
|
libmisc/walk_tree.c | 4 ++--
|
|
4 files changed, 15 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/attr/attr.c b/attr/attr.c
|
|
index e4a8272..2b1ba6a 100644
|
|
--- a/attr/attr.c
|
|
+++ b/attr/attr.c
|
|
@@ -173,9 +173,11 @@ main(int argc, char **argv)
|
|
exit(1);
|
|
}
|
|
if (verbose) {
|
|
+ int sink;
|
|
printf(_("Attribute \"%s\" set to a %d byte value "
|
|
"for %s:\n"), attrname, attrlength, filename);
|
|
- fwrite(attrvalue, 1, attrlength, stdout);
|
|
+ sink = fwrite(attrvalue, 1, attrlength, stdout);
|
|
+ (void) sink;
|
|
printf("\n");
|
|
}
|
|
break;
|
|
@@ -199,7 +201,11 @@ main(int argc, char **argv)
|
|
printf(_("Attribute \"%s\" had a %d byte value "
|
|
"for %s:\n"), attrname, attrlength, filename);
|
|
}
|
|
- fwrite(attrvalue, 1, attrlength, stdout);
|
|
+ {
|
|
+ /* silence compiler's warning */
|
|
+ int sink = fwrite(attrvalue, 1, attrlength, stdout);
|
|
+ (void) sink;
|
|
+ }
|
|
if (verbose) {
|
|
printf("\n");
|
|
}
|
|
diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c
|
|
index cae9c3f..1f2afe3 100644
|
|
--- a/getfattr/getfattr.c
|
|
+++ b/getfattr/getfattr.c
|
|
@@ -272,8 +272,10 @@ int print_attribute(const char *path, const char *name, int *header_printed)
|
|
*header_printed = 1;
|
|
}
|
|
|
|
- if (opt_value_only)
|
|
- fwrite(value, length, 1, stdout);
|
|
+ if (opt_value_only) {
|
|
+ int sink = fwrite(value, length, 1, stdout);
|
|
+ (void) sink;
|
|
+ }
|
|
else if (length) {
|
|
const char *enc = encode(value, &length);
|
|
|
|
diff --git a/libmisc/quote.c b/libmisc/quote.c
|
|
index f98c887..c7a1e75 100644
|
|
--- a/libmisc/quote.c
|
|
+++ b/libmisc/quote.c
|
|
@@ -19,6 +19,7 @@
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
+#include <string.h>
|
|
#include <ctype.h>
|
|
#include "misc.h"
|
|
|
|
diff --git a/libmisc/walk_tree.c b/libmisc/walk_tree.c
|
|
index 2777145..b82a301 100644
|
|
--- a/libmisc/walk_tree.c
|
|
+++ b/libmisc/walk_tree.c
|
|
@@ -98,8 +98,8 @@ static int walk_tree_rec(const char *path, int walk_flags,
|
|
* a dir not from a symlink
|
|
* a link and follow_symlinks
|
|
*/
|
|
- if ((flags & WALK_TREE_RECURSIVE) &&
|
|
- (!(flags & WALK_TREE_SYMLINK) && S_ISDIR(st.st_mode)) ||
|
|
+ if (((flags & WALK_TREE_RECURSIVE) &&
|
|
+ (!(flags & WALK_TREE_SYMLINK) && S_ISDIR(st.st_mode))) ||
|
|
((flags & WALK_TREE_SYMLINK) && follow_symlinks)) {
|
|
struct dirent *entry;
|
|
|