Ticket #3474 (new defect)

Opened 4 years ago

[patch] fix some -Wshorten-64-to-32 warnings

Reported by: and Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

fix some -Wshorten-64-to-32 warnings

Signed-off-by: Andreas Mohr <and@…>

key.c:1291:39: warning: implicit conversion loses integer precision: 'const long' to 'int' [-Wshorten-64-to-32]
input.c:301:28: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:301:32: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:743:36: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:743:40: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:756:36: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:756:40: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:787:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:788:43: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:1316:43: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:1322:21: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:1325:33: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input.c:1326:71: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
utilvfs.c:192:24: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
path.c:1112:49: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
input_complete.c:454:33: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_complete.c:716:47: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
input_complete.c:780:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_complete.c:1029:63: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_complete.c:1040:67: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_complete.c:1147:42: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_complete.c:1402:19: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_complete.c:1410:19: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
lock.c:184:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
charsets.c:256:20: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
achown.c:478:10: warning: implicit conversion loses integer precision: 'unsigned long' to 'unsigned int' [-Wshorten-64-to-32]
cmd.c:250:30: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
cmd.c:251:30: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
cmd.c:567:52: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
cmd.c:590:56: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
cmd.c:1262:13: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
cmd.c:1349:19: warning: implicit conversion loses integer precision: 'time_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
cmd.c:1356:15: warning: implicit conversion loses integer precision: '
time_t' (aka 'long') to 'unsigned int' [-Wshorten-64-to-32]
cmd.c:1357:11: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
command.c:387:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
dir.c:479:46: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
ext.c:1000:46: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
file.c:892:48: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
file.c:1803:34: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
file.c:1831:37: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
file.c:1869:39: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
file.c:1870:46: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
filegui.c:1264:21: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
find.c:995:30: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
treestore.c:356:44: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
treestore.c:463:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
vfs_class.c:442:10: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
vfs_class.c:464:10: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
hex.c:229:56: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
edit.c:1691:11: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
edit.c:2363:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
edit.c:2373:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
edit.c:2442:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
edit.c:2452:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
edit.c:2972:27: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
etags.c:213:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
format.c:307:16: warning: implicit conversion loses integer precision: 'off_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
format.c:319:20: warning: implicit conversion loses integer precision: 'off_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
syntax.c:294:25: warning: implicit conversion loses integer precision: 'off_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
syntax.c:452:27: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
syntax.c:553:23: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
syntax.c:1296:26: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
syntax.c:1311:22: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
syntax.c:1348:39: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
setup.c:695:22: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
subshell.c:519:21: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
subshell.c:539:21: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
subshell.c:563:21: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
background.c:379:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
parse_ls_vga.c:88:11: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
parse_ls_vga.c:852:18: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutil8bit.c:276:38: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutil8bit.c:279:27: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutil8bit.c:322:38: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutil8bit.c:325:28: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutilascii.c:228:38: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutilascii.c:231:27: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutilascii.c:289:38: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
strutilascii.c:292:28: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
menu.c:123:73: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:181:73: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:250:75: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:332:73: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:351:67: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:372:67: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:396:67: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:425:67: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:470:68: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:511:45: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
menu.c:517:71: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
menu.c:721:59: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
tar.c:357:9: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
tar.c:382:19: warning: implicit conversion loses integer precision: 'long' to 'mode_t' (aka 'unsigned int') [-Wshorten-64-to-32]
tar.c:412:15: warning: implicit conversion loses integer precision: 'long' to '
uid_t' (aka 'unsigned int') [-Wshorten-64-to-32]
tar.c:415:15: warning: implicit conversion loses integer precision: 'long' to 'gid_t' (aka 'unsigned int') [-Wshorten-64-to-32]
tar.c:429:22: warning: implicit conversion loses integer precision: 'long' to '
uid_t' (aka 'unsigned int') [-Wshorten-64-to-32]
tar.c:430:22: warning: implicit conversion loses integer precision: 'long' to 'gid_t' (aka 'unsigned int') [-Wshorten-64-to-32]
tty-ncurses.c:132:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:133:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:134:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:135:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:136:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:137:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:138:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:139:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:140:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:141:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:142:26: warning: implicit conversion loses integer precision: 'chtype' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:144:39: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:145:39: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:146:39: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:147:39: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:148:35: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:149:35: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:150:35: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:151:35: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:152:36: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
tty-ncurses.c:153:36: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
setup.c:654:38: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
setup.c:664:34: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
fish.c:399:31: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
undelfs.c:252:14: warning: implicit conversion loses integer precision: 'errcode_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
undelfs.c:258:14: warning: implicit conversion loses integer precision: 'errcode_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
undelfs.c:280:18: warning: implicit conversion loses integer precision: 'errcode_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
undelfs.c:314:18: warning: implicit conversion loses integer precision: 'errcode_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
undelfs.c:456:13: warning: implicit conversion loses integer precision: 'long' to 'ext2_ino_t' (aka 'unsigned int') [-Wshorten-64-to-32]
undelfs.c:518:25: warning: implicit conversion loses integer precision: 'errcode_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
undelfs.c:544:29: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
undelfs.c:550:46: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
undelfs.c:559:46: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
undelfs.c:594:14: warning: implicit conversion loses integer precision: 'errcode_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
undelfs.c:611:24: warning: implicit conversion loses integer precision: 'long' to 'ext2_ino_t' (aka 'unsigned int') [-Wshorten-64-to-32]
undelfs.c:675:19: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
usermenu.c:670:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
usermenu.c:725:22: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
usermenu.c:729:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
vfs.c:135:19: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
vfs.c:149:38: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
vfs.c:153:30: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]

Attachments

mc-3474-cleanup-shorten_64_to_32-warning.patch (43.3 KB) - added by and 4 years ago.
mc-3474-cleanup-shorten_64_to_32-warning-v2.patch (43.3 KB) - added by and 4 years ago.
v2: utilvfs.c needs signed long or we trigger a heap overflow warning

Change History

Changed 4 years ago by and

Changed 4 years ago by and

v2: utilvfs.c needs signed long or we trigger a heap overflow warning

Note: See TracTickets for help on using tickets.