commit e4a74e1f7bfbe71dd0ab067e79812ebb3921ca27
Author: Adam Majer <amajer@suse.de>
Date: Tue Jun 26 11:51:47 2018 +0200
Ticket #3922: Cast to correct type
Octal is an unsigned int, not a signed int
fish.c:1360:64: format ‘%o’ expects argument of type ‘unsigned int’, but argument 7 has type ‘int’
"FISH_FILENAME=%s FISH_FILEMODE=%4.4o;\n", rpath, (int) (mode & 07777));
~~~~^ ~~~~~~~~~~~~~~~~~~~~
%4.4o
Signed-off-by: Adam Majer <amajer@suse.de>
diff --git a/src/vfs/fish/fish.c b/src/vfs/fish/fish.c
index d14631565..aff896bc5 100644
a
|
b
|
fish_chmod (const vfs_path_t * vpath, mode_t mode) |
1357 | 1357 | |
1358 | 1358 | ret = |
1359 | 1359 | fish_send_command (path_element->class, super, OPT_FLUSH, SUP->scr_chmod, |
1360 | | "FISH_FILENAME=%s FISH_FILEMODE=%4.4o;\n", rpath, (int) (mode & 07777)); |
| 1360 | "FISH_FILENAME=%s FISH_FILEMODE=%4.4o;\n", rpath, (unsigned) (mode & 07777)); |
1361 | 1361 | |
1362 | 1362 | g_free (rpath); |
1363 | 1363 | |