Ticket #3474: mc-3474-cleanup-shorten_64_to_32-warning-v2.patch
File mc-3474-cleanup-shorten_64_to_32-warning-v2.patch, 43.3 KB (added by and, 9 years ago) |
---|
-
lib/tty/key.c
fix some -Wshorten-64-to-32 warnings Signed-off-by: Andreas Mohr <and@gmx.li> 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]
a b 1284 1284 /* --------------------------------------------------------------------------------------------- */ 1285 1285 1286 1286 static gboolean 1287 lookup_keycode (const longcode, int *idx)1287 lookup_keycode (const int code, int *idx) 1288 1288 { 1289 1289 if (code != 0) 1290 1290 { -
lib/widget/input.c
a b 135 135 /* --------------------------------------------------------------------------------------------- */ 136 136 137 137 static gboolean 138 input_eval_marks (WInput * in, long *start_mark, long*end_mark)138 input_eval_marks (WInput * in, int *start_mark, int *end_mark) 139 139 { 140 140 if (in->mark >= 0) 141 141 { … … 294 294 static cb_ret_t 295 295 insert_char (WInput * in, int c_code) 296 296 { 297 int res; 298 long m1, m2; 297 int res, m1, m2; 299 298 300 299 if (input_eval_marks (in, &m1, &m2)) 301 300 delete_region (in, m1, m2); … … 737 736 break; 738 737 case CK_BackSpace: 739 738 { 740 longm1, m2;739 int m1, m2; 741 740 742 741 if (input_eval_marks (in, &m1, &m2)) 743 742 delete_region (in, m1, m2); … … 750 749 port_region_marked_for_delete (in); 751 750 else 752 751 { 753 longm1, m2;752 int m1, m2; 754 753 755 754 if (input_eval_marks (in, &m1, &m2)) 756 755 delete_region (in, m1, m2); … … 781 780 break; 782 781 case CK_Cut: 783 782 { 784 longm;783 int m; 785 784 786 785 m = max (in->mark, 0); 787 786 copy_region (in, m, in->point); … … 1300 1299 w->cols - has_history)); 1301 1300 else 1302 1301 { 1303 longm1, m2;1302 int m1, m2; 1304 1303 1305 1304 if (input_eval_marks (in, &m1, &m2)) 1306 1305 { -
lib/vfs/utilvfs.c
a b 178 178 { 179 179 const char *p; 180 180 char *suffix, *q; 181 int shift;181 ssize_t shift; 182 182 int fd; 183 183 184 184 /* Strip directories */ -
lib/vfs/path.c
a b 1089 1089 vfs_path_serialize (const vfs_path_t * vpath, GError ** mcerror) 1090 1090 { 1091 1091 mc_config_t *cpath; 1092 ssize_t element_index;1092 int element_index; 1093 1093 char *ret_value; 1094 1094 1095 1095 mc_return_val_if_error (mcerror, FALSE); … … 1108 1108 char *groupname; 1109 1109 const vfs_path_element_t *element; 1110 1110 1111 groupname = g_strdup_printf ("path-element-% zd", element_index);1111 groupname = g_strdup_printf ("path-element-%d", element_index); 1112 1112 element = vfs_path_get_by_index (vpath, element_index); 1113 1113 /* convert one element to config group */ 1114 1114 -
lib/widget/input_complete.c
a b 99 99 100 100 static int query_height, query_width; 101 101 static WInput *input; 102 static intmin_end;103 static intstart = 0;104 static intend = 0;102 static long min_end; 103 static long start = 0; 104 static long end = 0; 105 105 106 106 /*** file scope functions ************************************************************************/ 107 107 /* --------------------------------------------------------------------------------------------- */ 108 108 109 char **try_complete (char *text, int *lc_start, int*lc_end, input_complete_t flags);109 char **try_complete (char *text, long *lc_start, long *lc_end, input_complete_t flags); 110 110 void complete_engine_fill_completions (WInput * in); 111 111 112 112 #ifdef DO_COMPLETION_DEBUG … … 449 449 450 450 if (hosts_p - hosts >= hosts_alloclen) 451 451 { 452 intj;452 long j; 453 453 454 454 j = hosts_p - hosts; 455 455 hosts_alloclen += 30; … … 701 701 completion_matches (const char *text, CompletionFunction entry_function, input_complete_t flags) 702 702 { 703 703 /* Number of slots in match_list. */ 704 size_t match_list_size = 30;704 int match_list_size = 30; 705 705 /* The list of matches. */ 706 706 char **match_list; 707 707 /* Number of matches actually found. */ 708 size_t matches = 0;708 int matches = 0; 709 709 710 710 /* Temporary string binder. */ 711 711 char *string; … … 737 737 } 738 738 else 739 739 { 740 size_t i = 1;741 intlow = 4096; /* Count of max-matched characters. */742 size_t j;740 int i = 1; 741 long low = 4096; /* Count of max-matched characters. */ 742 int j; 743 743 744 744 qsort (match_list + 1, matches, sizeof (char *), match_compare); 745 745 … … 797 797 /* --------------------------------------------------------------------------------------------- */ 798 798 /** Check if directory completion is needed */ 799 799 static gboolean 800 check_is_cd (const char *text, intlc_start, input_complete_t flags)800 check_is_cd (const char *text, long lc_start, input_complete_t flags) 801 801 { 802 802 char *p, *q; 803 803 … … 819 819 /* --------------------------------------------------------------------------------------------- */ 820 820 821 821 static void 822 try_complete_commands_prepare (try_complete_automation_state_t * state, char *text, int*lc_start)822 try_complete_commands_prepare (try_complete_automation_state_t * state, char *text, long *lc_start) 823 823 { 824 824 const char *command_separator_chars = ";|&{(`"; 825 825 char *ti; … … 893 893 /* --------------------------------------------------------------------------------------------- */ 894 894 895 895 static char ** 896 try_complete_all_possible (try_complete_automation_state_t * state, char *text, int*lc_start)896 try_complete_all_possible (try_complete_automation_state_t * state, char *text, long *lc_start) 897 897 { 898 898 char **matches = NULL; 899 899 … … 1033 1033 } 1034 1034 else 1035 1035 { 1036 intnew_end;1036 long new_end; 1037 1037 int i; 1038 1038 GList *e; 1039 1039 … … 1076 1076 GList *e; 1077 1077 int i; 1078 1078 int need_redraw = 0; 1079 intlow = 4096;1079 long low = 4096; 1080 1080 char *last_text = NULL; 1081 1081 1082 1082 buff[bl++] = (char) parm; … … 1233 1233 h = LINES - start_y - 1; 1234 1234 } 1235 1235 } 1236 x = start - in->term_first_shown - 2 + start_x;1236 x = (int) start - in->term_first_shown - 2 + start_x; 1237 1237 w = maxlen + 4; 1238 1238 if (x + w > COLS) 1239 1239 x = COLS - w; … … 1279 1279 1280 1280 /** Returns an array of matches, or NULL if none. */ 1281 1281 char ** 1282 try_complete (char *text, int *lc_start, int*lc_end, input_complete_t flags)1282 try_complete (char *text, long *lc_start, long *lc_end, input_complete_t flags) 1283 1283 { 1284 1284 try_complete_automation_state_t state; 1285 1285 char **matches = NULL; -
lib/lock.c
a b 178 178 static char * 179 179 lock_get_info (const char *lockfname) 180 180 { 181 int cnt;181 ssize_t cnt; 182 182 static char buf[BUF_SIZE]; 183 183 184 184 cnt = readlink (lockfname, buf, BUF_SIZE - 1); -
lib/charsets.c
a b 246 246 int 247 247 get_codepage_index (const char *id) 248 248 { 249 size_t i;249 guint i; 250 250 if (strcmp (id, OTHER_8BIT) == 0) 251 251 return -1; 252 252 if (codepages == NULL) -
src/filemanager/achown.c
a b 473 473 WDialog *h = DIALOG (w); 474 474 int i; 475 475 int f_pos; 476 unsigned intid;476 unsigned long id; 477 477 478 478 id = dlg_get_current_widget_id (h); 479 479 -
src/filemanager/cmd.c
a b 243 243 #else 244 244 /* Don't have mmap() :( Even more ugly :) */ 245 245 char buf1[BUFSIZ], buf2[BUFSIZ]; 246 int n1, n2;246 ssize_t n1, n2; 247 247 rotate_dash (TRUE); 248 248 do 249 249 { … … 541 541 542 542 gboolean 543 543 view_file_at_line (const vfs_path_t * filename_vpath, gboolean plain_view, gboolean internal, 544 longstart_line)544 int start_line) 545 545 { 546 546 gboolean ret = TRUE; 547 547 … … 580 580 char view_entry[BUF_TINY]; 581 581 582 582 if (start_line > 0) 583 g_snprintf (view_entry, sizeof (view_entry), "View:% ld", start_line);583 g_snprintf (view_entry, sizeof (view_entry), "View:%d", start_line); 584 584 else 585 585 strcpy (view_entry, "View"); 586 586 … … 1250 1250 { 1251 1251 char buffer[MC_MAXPATHLEN]; 1252 1252 char *p = NULL; 1253 int i;1253 ssize_t i; 1254 1254 char *q; 1255 1255 vfs_path_t *p_vpath; 1256 1256 … … 1336 1336 get_random_hint (int force) 1337 1337 { 1338 1338 char *data, *result = NULL, *eop; 1339 int len;1339 size_t len; 1340 1340 int start; 1341 static intlast_sec;1341 static long last_sec; 1342 1342 static struct timeval tv; 1343 1343 GIConv conv; 1344 1344 … … 1353 1353 return NULL; 1354 1354 1355 1355 /* get a random entry */ 1356 srand ( tv.tv_sec);1356 srand ((int)tv.tv_sec); 1357 1357 len = strlen (data); 1358 1358 start = rand () % (len - 1); 1359 1359 -
src/filemanager/cmd.h
a b 44 44 void single_dirsize_cmd (void); 45 45 void dirsizes_cmd (void); 46 46 gboolean view_file_at_line (const vfs_path_t * filename_vpath, gboolean plain_view, 47 gboolean internal, longstart_line);47 gboolean internal, int start_line); 48 48 gboolean view_file (const vfs_path_t * filename_vpath, gboolean normal, gboolean internal); 49 49 void view_cmd (void); 50 50 void view_file_cmd (void); -
src/filemanager/command.c
a b 374 374 void 375 375 do_cd_command (char *orig_cmd) 376 376 { 377 int len;377 ssize_t len; 378 378 int operand_pos = CD_OPERAND_OFFSET; 379 379 const char *cmd; 380 380 -
src/filemanager/dir.c
a b 476 476 int bd = MY_ISDIR (b); 477 477 478 478 if (ad == bd || panels_options.mix_all_files) 479 return ( a->st.st_ino - b->st.st_ino) * reverse;479 return (int)(a->st.st_ino - b->st.st_ino) * reverse; 480 480 else 481 481 return bd - ad; 482 482 } -
src/filemanager/ext.c
a b 273 273 parameter_found = TRUE; 274 274 else 275 275 { 276 inti;276 long i; 277 277 char *v; 278 278 279 279 i = check_format_view (lc_data); … … 777 777 struct stat mystat; 778 778 int view_at_line_number; 779 779 char *include_target; 780 int include_target_len;780 size_t include_target_len; 781 781 gboolean have_type = FALSE; /* Flag used by regex_check_type() */ 782 782 783 783 if (filename_vpath == NULL) -
src/filemanager/file.c
a b 890 889 remain_bytes = ctx->progress_bytes - tctx->copied_bytes; 891 890 #if 1 892 891 { 893 inttotal_secs = tv_current.tv_sec - tctx->transfer_start.tv_sec;892 long total_secs = tv_current.tv_sec - tctx->transfer_start.tv_sec; 894 893 895 894 if (total_secs < 1) 896 895 total_secs = 1; … … 1484 1483 gid_t src_gid = (gid_t) (-1); 1485 1484 1486 1485 int src_desc, dest_desc = -1; 1487 int n_read, n_written;1486 ssize_t n_read, n_written; 1488 1487 mode_t src_mode = 0; /* The mode of the source file */ 1489 1488 struct stat sb, sb2; 1490 1489 struct utimbuf utb; … … 1788 1787 { 1789 1788 off_t n_read_total = 0; 1790 1789 struct timeval tv_current, tv_last_update, tv_last_input; 1791 intsecs, update_secs;1790 long secs, update_secs; 1792 1791 const char *stalled_msg = ""; 1793 1792 1794 1793 tv_last_update = tv_transfer_start; -
src/filemanager/filegui.c
a b 1170 1170 gboolean only_one, 1171 1171 const char *format, const void *text, const char *def_text, gboolean * do_bg) 1172 1172 { 1173 size_t fmd_xlen;1173 int fmd_xlen; 1174 1174 vfs_path_t *vpath; 1175 1175 int source_easy_patterns = easy_patterns; 1176 1176 char fmd_buf[BUF_MEDIUM]; -
src/filemanager/find.c
a b 966 966 { 967 967 int line = 1; 968 968 int pos = 0; 969 int n_read = 0;969 ssize_t n_read = 0; 970 970 gboolean found = FALSE; 971 971 gsize found_len; 972 972 char result[BUF_MEDIUM]; -
src/filemanager/treestore.c
a b 350 350 { 351 351 if (vfs_file_is_local (current->name)) 352 352 { 353 int i, common; 353 int i; 354 size_t common; 354 355 355 356 /* Clear-text compression */ 356 357 if (current->prev && (common = str_common (current->prev->name, current->name)) > 2) 357 358 { 358 359 char *encoded = encode (current->name, common); 359 360 360 i = fprintf (file, "%d:% d %s\n", current->scanned, common, encoded);361 i = fprintf (file, "%d:%ld %s\n", current->scanned, common, encoded); 361 362 g_free (encoded); 362 363 } 363 364 else … … 392 393 tree_entry *current = ts.tree_first; 393 394 tree_entry *old = NULL; 394 395 tree_entry *new; 395 intsubmask = 0;396 long submask = 0; 396 397 397 398 if (ts.tree_last && ts.tree_last->next) 398 399 abort (); -
src/vfs/sftpfs/vfs_class.c
a b 429 429 static ssize_t 430 430 sftpfs_cb_read (void *data, char *buffer, size_t count) 431 431 { 432 int rc;432 ssize_t rc; 433 433 GError *mcerror = NULL; 434 434 vfs_file_handler_t *fh = (vfs_file_handler_t *) data; 435 435 … … 457 457 static ssize_t 458 458 sftpfs_cb_write (void *data, const char *buf, size_t nbyte) 459 459 { 460 int rc;460 ssize_t rc; 461 461 GError *mcerror = NULL; 462 462 vfs_file_handler_t *fh = (vfs_file_handler_t *) data; 463 463 -
src/viewer/hex.c
a b 116 116 mark_t boldflag_char = MARK_NORMAL; 117 117 struct hexedit_change_node *curr = view->change_list; 118 118 #ifdef HAVE_CHARSET 119 intcont_bytes = 0; /* number of continuation bytes remanining from current UTF-8 */119 long cont_bytes = 0; /* number of continuation bytes remanining from current UTF-8 */ 120 120 gboolean cjk_right = FALSE; /* whether the second byte of a CJK is to be processed */ 121 121 #endif /* HAVE_CHARSET */ 122 122 gboolean utf8_changed = FALSE; /* whether any of the bytes in the UTF-8 were changed */ -
src/editor/edit.c
a b 1683 1683 long *col1, long *col2) 1684 1684 { 1685 1685 off_t cursor; 1686 intcol;1686 long col; 1687 1687 off_t blocklen = -1, width = 0; 1688 1688 unsigned char *data; 1689 1689 … … 2357 2357 && spm1 != edit->undo_stack_bottom 2358 2358 && ((sp - 2) & edit->undo_stack_size_mask) != edit->undo_stack_bottom) 2359 2359 { 2360 intd;2360 long d; 2361 2361 if (edit->undo_stack[spm1] < 0) 2362 2362 { 2363 2363 d = edit->undo_stack[(sp - 2) & edit->undo_stack_size_mask]; … … 2436 2436 && spm1 != edit->redo_stack_bottom 2437 2437 && ((sp - 2) & edit->redo_stack_size_mask) != edit->redo_stack_bottom) 2438 2438 { 2439 intd;2439 long d; 2440 2440 if (edit->redo_stack[spm1] < 0) 2441 2441 { 2442 2442 d = edit->redo_stack[(sp - 2) & edit->redo_stack_size_mask]; … … 2967 2967 fake_half_tabs = HALF_TAB_SIZE * space_width; 2968 2968 if (fake_half_tabs != 0 && edit->curs_col % fake_half_tabs != 0) 2969 2969 { 2970 intq;2970 long q; 2971 2971 2972 2972 q = edit->curs_col; 2973 2973 edit->curs_col -= (edit->curs_col % fake_half_tabs); -
src/editor/etags.c
a b 188 188 char *chekedstr = NULL; 189 189 190 190 int num = 0; /* returned value */ 191 int pos;191 size_t pos; 192 192 char *filename = NULL; 193 193 194 194 if (!match_func || !tagfile) -
src/editor/format.c
a b 298 298 /* --------------------------------------------------------------------------------------------- */ 299 299 /** find the start of a word */ 300 300 301 static inline int301 static inline off_t 302 302 word_start (unsigned char *t, off_t q, off_t size) 303 303 { 304 304 off_t i; -
src/editor/syntax.c
a b 254 254 const char *whole_left, const char *whole_right, long line_start) 255 255 { 256 256 const unsigned char *p, *q; 257 int c, d, j; 257 off_t j; 258 int c, d; 258 259 259 260 if (*text == '\0') 260 261 return -1; … … 446 447 while (*(p = xx_strchr (edit, (unsigned char *) p + 1, c)) != '\0') 447 448 { 448 449 syntax_keyword_t *k; 449 intcount;450 long count; 450 451 off_t e; 451 452 452 453 count = p - r->keyword_first_chars; … … 547 548 while (*(p = xx_strchr (edit, (unsigned char *) p + 1, c)) != '\0') 548 549 { 549 550 syntax_keyword_t *k; 550 intcount;551 long count; 551 552 off_t e; 552 553 553 554 count = p - r->keyword_first_chars; … … 1260 1261 FILE *f, *g = NULL; 1261 1262 char *args[1024], *l = NULL; 1262 1263 long line = 0; 1263 intresult = 0;1264 long result = 0; 1264 1265 char *lib_file; 1265 1266 gboolean found = FALSE; 1266 1267 -
src/setup.c
a b 690 690 values = mc_config_get_string_list (cfg, section_name, *profile_keys, NULL); 691 691 if (values != NULL) 692 692 { 693 int action; 694 695 action = keybind_lookup_action (*profile_keys); 693 long action = keybind_lookup_action (*profile_keys); 696 694 if (action > 0) 697 695 { 698 696 gchar **curr_values; -
src/subshell.c
a b 462 462 feed_subshell (int how, int fail_on_error) 463 463 { 464 464 fd_set read_set; /* For 'select' */ 465 int bytes; /* For the return value from 'read' */465 ssize_t bytes; /* For the return value from 'read' */ 466 466 int i; /* Loop counter */ 467 467 468 468 struct timeval wtime; /* Maximum time we wait for the subshell */ -
src/background.c
a b 348 348 } 349 349 else if (type == Return_String) 350 350 { 351 int len;351 size_t len; 352 352 char *resstr = NULL; 353 353 354 354 /* FIXME: string routines should also use the Foreground/Background -
lib/vfs/parse_ls_vga.c
a b 80 80 static int 81 81 is_dos_date (const char *str) 82 82 { 83 int len;83 size_t len; 84 84 85 85 if (!str) 86 86 return 0; … … 849 849 850 850 if (t) 851 851 { 852 int p2 = strlen (t);852 size_t p2 = strlen (t); 853 853 if ((--p2 > 0) && (t[p2] == '\r' || t[p2] == '\n')) 854 854 t[p2] = 0; 855 855 if ((--p2 > 0) && (t[p2] == '\r' || t[p2] == '\n')) -
lib/strutil/strutil8bit.c
a b 259 259 static char result[BUF_MEDIUM]; 260 260 char *actual; 261 261 size_t remain; 262 int ident = 0;262 size_t ident = 0; 263 263 size_t length; 264 264 size_t pos = 0; 265 265 … … 282 282 break; 283 283 } 284 284 285 if ( (int)remain <= ident)285 if (remain <= ident) 286 286 goto finally; 287 287 memset (actual, ' ', ident); 288 288 actual += ident; -
lib/strutil/strutilascii.c
a b 211 211 static char result[BUF_MEDIUM]; 212 212 char *actual; 213 213 size_t remain; 214 int ident = 0;214 size_t ident = 0; 215 215 size_t length; 216 216 size_t pos = 0; 217 217 … … 235 235 } 236 236 237 237 /* add space before text */ 238 if ( (int)remain <= ident)238 if (remain <= ident) 239 239 goto finally; 240 240 memset (actual, ' ', ident); 241 241 actual += ident; -
lib/widget/menu.h
a b 34 34 gboolean is_active; /* If the menubar is in use */ 35 35 gboolean is_dropped; /* If the menubar has dropped */ 36 36 GList *menu; /* The actual menus */ 37 size_t selected; /* Selected menu on the top bar */37 guint selected; /* Selected menu on the top bar */ 38 38 unsigned long previous_widget; /* Selected widget ID before activating menu */ 39 39 } WMenuBar; 40 40 -
src/vfs/tar/tar.c
a b 235 235 * 236 236 * Result is -1 if the field is invalid (all blank, or nonoctal). 237 237 */ 238 static long238 static int 239 239 tar_from_oct (int digs, char *where) 240 240 { 241 longvalue;241 int value; 242 242 243 243 while (isspace ((unsigned char) *where)) 244 244 { /* Skip spaces */ … … 350 350 static union record * 351 351 tar_get_next_record (struct vfs_s_super *archive, int tard) 352 352 { 353 int n;353 ssize_t n; 354 354 355 355 (void) archive; 356 356 -
lib/tty/tty-ncurses.c
a b 127 127 struct mc_tty_lines_struct 128 128 { 129 129 const char *line; 130 intline_code;130 chtype line_code; 131 131 } const lines_codes[] = { 132 132 {"\342\224\230", ACS_LRCORNER}, /* ┌ */ 133 133 {"\342\224\224", ACS_LLCORNER}, /* └ */ -
lib/keybind.c
a b 416 416 keybind_cmd_bind (GArray * keymap, const char *keybind, unsigned long action) 417 417 { 418 418 char *caption = NULL; 419 longkey;419 int key; 420 420 421 421 key = lookup_key (keybind, &caption); 422 422 keymap_add (keymap, key, action, caption); -
lib/tty/key.c
a b 1458 1458 * Return the code associated with the symbolic name keyname 1459 1459 */ 1460 1460 1461 long 1461 int 1462 1462 lookup_key (const char *name, char **label) 1463 1463 { 1464 1464 char **lc_keys, **p; … … 1567 1567 if (use_meta != -1) 1568 1568 k = ALT (k); 1569 1569 1570 return (long)k;1570 return k; 1571 1571 } 1572 1572 1573 1573 /* --------------------------------------------------------------------------------------------- */ -
lib/tty/key.h
a b 75 75 void init_key_input_fd (void); 76 76 void done_key (void); 77 77 78 longlookup_key (const char *name, char **label);78 int lookup_key (const char *name, char **label); 79 79 char *lookup_key_by_code (const int keycode); 80 80 /* mouse support */ 81 81 int tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block); -
src/setup.c
a b 619 619 char *section_name; 620 620 gchar **profile_keys, **keys; 621 621 char *valcopy, *value; 622 longkey_code;622 int key_code; 623 623 624 624 if (terminal == NULL) 625 625 return; -
src/vfs/fish/fish.c
a b 395 395 ERRNOR (ECONNRESET, FALSE); 396 396 if (strncmp (buffer, "### ", 4) == 0) 397 397 break; 398 SUP->host_flags = ato l(buffer);398 SUP->host_flags = atoi (buffer); 399 399 } 400 400 return TRUE; 401 401 } -
src/vfs/undelfs/undelfs.c
a b 104 104 { 105 105 int f_index; /* file index into delarray */ 106 106 char *buf; 107 int error_code; /* */107 errcode_t error_code; /* */ 108 108 off_t pos; /* file position */ 109 109 off_t current; /* used to determine current position in itereate */ 110 110 gboolean finished; … … 230 230 static int 231 231 undelfs_loaddel (void) 232 232 { 233 int retval, count; 233 int count; 234 errcode_t retval; 234 235 ext2_ino_t ino; 235 236 struct ext2_inode inode; 236 237 ext2_inode_scan scan; … … 252 253 retval = ext2fs_open_inode_scan (fs, 0, &scan); 253 254 if (retval != 0) 254 255 { 255 message (D_ERROR, undelfserr, _("open_inode_scan: % d"), retval);256 message (D_ERROR, undelfserr, _("open_inode_scan: %ld"), retval); 256 257 goto free_block_buf; 257 258 } 258 259 retval = ext2fs_get_next_inode (scan, &ino, &inode); 259 260 if (retval != 0) 260 261 { 261 message (D_ERROR, undelfserr, _("while starting inode scan % d"), retval);262 message (D_ERROR, undelfserr, _("while starting inode scan %ld"), retval); 262 263 goto error_out; 263 264 } 264 265 count = 0; … … 280 281 retval = ext2fs_block_iterate (fs, ino, 0, block_buf, undelfs_lsdel_proc, &lsd); 281 282 if (retval) 282 283 { 283 message (D_ERROR, undelfserr, _("while calling ext2_block_iterate % d"), retval);284 message (D_ERROR, undelfserr, _("while calling ext2_block_iterate %ld"), retval); 284 285 goto next; 285 286 } 286 287 if (lsd.free_blocks && !lsd.bad_blocks) … … 314 315 retval = ext2fs_get_next_inode (scan, &ino, &inode); 315 316 if (retval) 316 317 { 317 message (D_ERROR, undelfserr, _("while doing inode scan % d"), retval);318 message (D_ERROR, undelfserr, _("while doing inode scan %ld"), retval); 318 319 goto error_out; 319 320 } 320 321 } … … 453 454 g_free (f); 454 455 return 0; 455 456 } 456 inode = ato l(f);457 inode = atoi (f); 457 458 458 459 /* Search the file into delarray */ 459 460 for (i = 0; i < (ext2_ino_t) num_delarray; i++) … … 507 508 static int 508 509 undelfs_dump_read (ext2_filsys param_fs, blk_t * blocknr, int blockcnt, void *private) 509 510 { 510 int copy_count;511 size_t copy_count; 511 512 undelfs_file *p = (undelfs_file *) private; 512 513 513 514 if (blockcnt < 0) … … 580 581 undelfs_read (void *vfs_info, char *buffer, size_t count) 581 582 { 582 583 undelfs_file *p = vfs_info; 583 int retval;584 errcode_t retval; 584 585 585 586 p->dest_buffer = buffer; 586 587 p->current = 0; … … 605 606 606 607 /* --------------------------------------------------------------------------------------------- */ 607 608 608 static long609 static int 609 610 undelfs_getindex (char *path) 610 611 { 611 ext2_ino_t inode = ato l(path);612 ext2_ino_t inode = atoi (path); 612 613 int i; 613 614 614 615 for (i = 0; i < num_delarray; i++) -
src/filemanager/usermenu.c
a b 530 530 { 531 531 if (*commands == '%') 532 532 { 533 inti = check_format_view (commands + 1);533 long i = check_format_view (commands + 1); 534 534 if (i) 535 535 { 536 536 commands += i; … … 632 632 */ 633 633 634 634 /* Returns how many characters we should advance if %view was found */ 635 int 635 long 636 636 check_format_view (const char *p) 637 637 { 638 638 const char *q = p; … … 674 674 675 675 /* --------------------------------------------------------------------------------------------- */ 676 676 677 int 677 long 678 678 check_format_cd (const char *p) 679 679 { 680 680 return (strncmp (p, "cd", 2)) ? 0 : 3; … … 685 685 /* Returns the number of skipped characters (zero on not found) */ 686 686 /* V will be set to the expanded variable name */ 687 687 688 int 688 long 689 689 check_format_var (const char *p, char **v) 690 690 { 691 691 const char *q = p; -
src/filemanager/usermenu.h
diff -ruN a/src/filemanager/usermenu.h b/src/filemanager/usermenu.h
a b 21 21 22 22 gboolean user_menu_cmd (struct WEdit *edit_widget, const char *menu_file, int selected_entry); 23 23 char *expand_format (struct WEdit *edit_widget, char c, gboolean do_quote); 24 intcheck_format_view (const char *);25 intcheck_format_var (const char *, char **);26 intcheck_format_cd (const char *);24 long check_format_view (const char *); 25 long check_format_var (const char *, char **); 26 long check_format_cd (const char *); 27 27 28 28 /*** inline functions ****************************************************************************/ 29 29 -
lib/vfs/vfs.c
a b 111 111 */ 112 112 113 113 static estr_t 114 _vfs_translate_path (const char *path, intsize, GIConv defcnv, GString * buffer)114 _vfs_translate_path (const char *path, long size, GIConv defcnv, GString * buffer) 115 115 { 116 116 estr_t state = ESTR_SUCCESS; 117 117 #ifdef HAVE_CHARSET … … 129 129 char encoding[16]; 130 130 const char *slash; 131 131 GIConv coder = INVALID_CONV; 132 intms;132 long ms; 133 133 134 134 /* first must be translated part before #enc: */ 135 135 ms = semi - path;