mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 01:54:24 +03:00
clang: fix -Wconstant-conversion
warning
../../../src/filemanager/filegui.c:1413:35: warning: implicit conversion from 'int' to 'mode_t' (aka 'unsigned short') changes value from 262143 to 65535 [-Wconstant-conversion] ctx->umask_kill = 0777777; ~ ^~~~~~~ ../../../src/filemanager/fileopctx.c:81:23: warning: implicit conversion from 'int' to 'mode_t' (aka 'unsigned short') changes value from 262143 to 65535 [-Wconstant-conversion] ctx->umask_kill = 0777777; ~ ^~~~~~~ Signed-off-by: Yury V. Zaytsev <yury@shurup.com> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
de06f36ccf
commit
ce299bbee9
@ -1410,7 +1410,7 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format
|
|||||||
if (preserve)
|
if (preserve)
|
||||||
{
|
{
|
||||||
ctx->preserve = TRUE;
|
ctx->preserve = TRUE;
|
||||||
ctx->umask_kill = 0777777;
|
ctx->umask_kill = (mode_t) (~0);
|
||||||
ctx->preserve_uidgid = (geteuid () == 0);
|
ctx->preserve_uidgid = (geteuid () == 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1420,7 +1420,7 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format
|
|||||||
ctx->preserve = ctx->preserve_uidgid = FALSE;
|
ctx->preserve = ctx->preserve_uidgid = FALSE;
|
||||||
i2 = umask (0);
|
i2 = umask (0);
|
||||||
umask (i2);
|
umask (i2);
|
||||||
ctx->umask_kill = i2 ^ 0777777;
|
ctx->umask_kill = i2 ^ ((mode_t) (~0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*dest_dir == '\0')
|
if (*dest_dir == '\0')
|
||||||
|
@ -78,7 +78,7 @@ file_op_context_new (FileOperation op)
|
|||||||
ctx->stat_func = mc_lstat;
|
ctx->stat_func = mc_lstat;
|
||||||
ctx->preserve = TRUE;
|
ctx->preserve = TRUE;
|
||||||
ctx->preserve_uidgid = (geteuid () == 0);
|
ctx->preserve_uidgid = (geteuid () == 0);
|
||||||
ctx->umask_kill = 0777777;
|
ctx->umask_kill = (mode_t) (~0);
|
||||||
ctx->erase_at_end = TRUE;
|
ctx->erase_at_end = TRUE;
|
||||||
ctx->skip_all = FALSE;
|
ctx->skip_all = FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user