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, 7 years ago)

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

  • 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  
    12841284/* --------------------------------------------------------------------------------------------- */ 
    12851285 
    12861286static gboolean 
    1287 lookup_keycode (const long code, int *idx) 
     1287lookup_keycode (const int code, int *idx) 
    12881288{ 
    12891289    if (code != 0) 
    12901290    { 
  • lib/widget/input.c

    a b  
    135135/* --------------------------------------------------------------------------------------------- */ 
    136136 
    137137static gboolean 
    138 input_eval_marks (WInput * in, long *start_mark, long *end_mark) 
     138input_eval_marks (WInput * in, int *start_mark, int *end_mark) 
    139139{ 
    140140    if (in->mark >= 0) 
    141141    { 
     
    294294static cb_ret_t 
    295295insert_char (WInput * in, int c_code) 
    296296{ 
    297     int res; 
    298     long m1, m2; 
     297    int res, m1, m2; 
    299298 
    300299    if (input_eval_marks (in, &m1, &m2)) 
    301300        delete_region (in, m1, m2); 
     
    737736        break; 
    738737    case CK_BackSpace: 
    739738        { 
    740             long m1, m2; 
     739            int m1, m2; 
    741740 
    742741            if (input_eval_marks (in, &m1, &m2)) 
    743742                delete_region (in, m1, m2); 
     
    750749            port_region_marked_for_delete (in); 
    751750        else 
    752751        { 
    753             long m1, m2; 
     752            int m1, m2; 
    754753 
    755754            if (input_eval_marks (in, &m1, &m2)) 
    756755                delete_region (in, m1, m2); 
     
    781780        break; 
    782781    case CK_Cut: 
    783782        { 
    784             long m; 
     783            int m; 
    785784 
    786785            m = max (in->mark, 0); 
    787786            copy_region (in, m, in->point); 
     
    13001299                                                  w->cols - has_history)); 
    13011300        else 
    13021301        { 
    1303             long m1, m2; 
     1302            int m1, m2; 
    13041303 
    13051304            if (input_eval_marks (in, &m1, &m2)) 
    13061305            { 
  • lib/vfs/utilvfs.c

    a b  
    178178{ 
    179179    const char *p; 
    180180    char *suffix, *q; 
    181     int shift; 
     181    ssize_t shift; 
    182182    int fd; 
    183183 
    184184    /* Strip directories */ 
  • lib/vfs/path.c

    a b  
    10891089vfs_path_serialize (const vfs_path_t * vpath, GError ** mcerror) 
    10901090{ 
    10911091    mc_config_t *cpath; 
    1092     ssize_t element_index; 
     1092    int element_index; 
    10931093    char *ret_value; 
    10941094 
    10951095    mc_return_val_if_error (mcerror, FALSE); 
     
    11081108        char *groupname; 
    11091109        const vfs_path_element_t *element; 
    11101110 
    1111         groupname = g_strdup_printf ("path-element-%zd", element_index); 
     1111        groupname = g_strdup_printf ("path-element-%d", element_index); 
    11121112        element = vfs_path_get_by_index (vpath, element_index); 
    11131113        /* convert one element to config group */ 
    11141114 
  • lib/widget/input_complete.c

    a b  
    9999 
    100100static int query_height, query_width; 
    101101static WInput *input; 
    102 static int min_end; 
    103 static int start = 0; 
    104 static int end = 0; 
     102static long min_end; 
     103static long start = 0; 
     104static long end = 0; 
    105105 
    106106/*** file scope functions ************************************************************************/ 
    107107/* --------------------------------------------------------------------------------------------- */ 
    108108 
    109 char **try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags); 
     109char **try_complete (char *text, long *lc_start, long *lc_end, input_complete_t flags); 
    110110void complete_engine_fill_completions (WInput * in); 
    111111 
    112112#ifdef DO_COMPLETION_DEBUG 
     
    449449 
    450450                if (hosts_p - hosts >= hosts_alloclen) 
    451451                { 
    452                     int j; 
     452                    long j; 
    453453 
    454454                    j = hosts_p - hosts; 
    455455                    hosts_alloclen += 30; 
     
    701701completion_matches (const char *text, CompletionFunction entry_function, input_complete_t flags) 
    702702{ 
    703703    /* Number of slots in match_list. */ 
    704     size_t match_list_size = 30; 
     704    int match_list_size = 30; 
    705705    /* The list of matches. */ 
    706706    char **match_list; 
    707707    /* Number of matches actually found. */ 
    708     size_t matches = 0; 
     708    int matches = 0; 
    709709 
    710710    /* Temporary string binder. */ 
    711711    char *string; 
     
    737737        } 
    738738        else 
    739739        { 
    740             size_t i = 1; 
    741             int low = 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; 
    743743 
    744744            qsort (match_list + 1, matches, sizeof (char *), match_compare); 
    745745 
     
    797797/* --------------------------------------------------------------------------------------------- */ 
    798798/** Check if directory completion is needed */ 
    799799static gboolean 
    800 check_is_cd (const char *text, int lc_start, input_complete_t flags) 
     800check_is_cd (const char *text, long lc_start, input_complete_t flags) 
    801801{ 
    802802    char *p, *q; 
    803803 
     
    819819/* --------------------------------------------------------------------------------------------- */ 
    820820 
    821821static void 
    822 try_complete_commands_prepare (try_complete_automation_state_t * state, char *text, int *lc_start) 
     822try_complete_commands_prepare (try_complete_automation_state_t * state, char *text, long *lc_start) 
    823823{ 
    824824    const char *command_separator_chars = ";|&{(`"; 
    825825    char *ti; 
     
    893893/* --------------------------------------------------------------------------------------------- */ 
    894894 
    895895static char ** 
    896 try_complete_all_possible (try_complete_automation_state_t * state, char *text, int *lc_start) 
     896try_complete_all_possible (try_complete_automation_state_t * state, char *text, long *lc_start) 
    897897{ 
    898898    char **matches = NULL; 
    899899 
     
    10331033            } 
    10341034            else 
    10351035            { 
    1036                 int new_end; 
     1036                long new_end; 
    10371037                int i; 
    10381038                GList *e; 
    10391039 
     
    10761076                GList *e; 
    10771077                int i; 
    10781078                int need_redraw = 0; 
    1079                 int low = 4096; 
     1079                long low = 4096; 
    10801080                char *last_text = NULL; 
    10811081 
    10821082                buff[bl++] = (char) parm; 
     
    12331233                    h = LINES - start_y - 1; 
    12341234                } 
    12351235            } 
    1236             x = start - in->term_first_shown - 2 + start_x; 
     1236            x = (int) start - in->term_first_shown - 2 + start_x; 
    12371237            w = maxlen + 4; 
    12381238            if (x + w > COLS) 
    12391239                x = COLS - w; 
     
    12791279 
    12801280/** Returns an array of matches, or NULL if none. */ 
    12811281char ** 
    1282 try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags) 
     1282try_complete (char *text, long *lc_start, long *lc_end, input_complete_t flags) 
    12831283{ 
    12841284    try_complete_automation_state_t state; 
    12851285    char **matches = NULL; 
  • lib/lock.c

    a b  
    178178static char * 
    179179lock_get_info (const char *lockfname) 
    180180{ 
    181     int cnt; 
     181    ssize_t cnt; 
    182182    static char buf[BUF_SIZE]; 
    183183 
    184184    cnt = readlink (lockfname, buf, BUF_SIZE - 1); 
  • lib/charsets.c

    a b  
    246246int 
    247247get_codepage_index (const char *id) 
    248248{ 
    249     size_t i; 
     249    guint i; 
    250250    if (strcmp (id, OTHER_8BIT) == 0) 
    251251        return -1; 
    252252    if (codepages == NULL) 
  • src/filemanager/achown.c

    a b  
    473473    WDialog *h = DIALOG (w); 
    474474    int i; 
    475475    int f_pos; 
    476     unsigned int id; 
     476    unsigned long id; 
    477477 
    478478    id = dlg_get_current_widget_id (h); 
    479479 
  • src/filemanager/cmd.c

    a b  
    243243#else 
    244244            /* Don't have mmap() :( Even more ugly :) */ 
    245245            char buf1[BUFSIZ], buf2[BUFSIZ]; 
    246             int n1, n2; 
     246            ssize_t n1, n2; 
    247247            rotate_dash (TRUE); 
    248248            do 
    249249            { 
     
    541541 
    542542gboolean 
    543543view_file_at_line (const vfs_path_t * filename_vpath, gboolean plain_view, gboolean internal, 
    544                    long start_line) 
     544                   int start_line) 
    545545{ 
    546546    gboolean ret = TRUE; 
    547547 
     
    580580        char view_entry[BUF_TINY]; 
    581581 
    582582        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); 
    584584        else 
    585585            strcpy (view_entry, "View"); 
    586586 
     
    12501250    { 
    12511251        char buffer[MC_MAXPATHLEN]; 
    12521252        char *p = NULL; 
    1253         int i; 
     1253        ssize_t i; 
    12541254        char *q; 
    12551255        vfs_path_t *p_vpath; 
    12561256 
     
    13361336get_random_hint (int force) 
    13371337{ 
    13381338    char *data, *result = NULL, *eop; 
    1339     int len; 
     1339    size_t len; 
    13401340    int start; 
    1341     static int last_sec; 
     1341    static long last_sec; 
    13421342    static struct timeval tv; 
    13431343    GIConv conv; 
    13441344 
     
    13531353        return NULL; 
    13541354 
    13551355    /* get a random entry */ 
    1356     srand (tv.tv_sec); 
     1356    srand ((int)tv.tv_sec); 
    13571357    len = strlen (data); 
    13581358    start = rand () % (len - 1); 
    13591359 
  • src/filemanager/cmd.h

    a b  
    4444void single_dirsize_cmd (void); 
    4545void dirsizes_cmd (void); 
    4646gboolean view_file_at_line (const vfs_path_t * filename_vpath, gboolean plain_view, 
    47                             gboolean internal, long start_line); 
     47                            gboolean internal, int start_line); 
    4848gboolean view_file (const vfs_path_t * filename_vpath, gboolean normal, gboolean internal); 
    4949void view_cmd (void); 
    5050void view_file_cmd (void); 
  • src/filemanager/command.c

    a b  
    374374void 
    375375do_cd_command (char *orig_cmd) 
    376376{ 
    377     int len; 
     377    ssize_t len; 
    378378    int operand_pos = CD_OPERAND_OFFSET; 
    379379    const char *cmd; 
    380380 
  • src/filemanager/dir.c

    a b  
    476476    int bd = MY_ISDIR (b); 
    477477 
    478478    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; 
    480480    else 
    481481        return bd - ad; 
    482482} 
  • src/filemanager/ext.c

    a b  
    273273                parameter_found = TRUE; 
    274274            else 
    275275            { 
    276                 int i; 
     276                long i; 
    277277                char *v; 
    278278 
    279279                i = check_format_view (lc_data); 
     
    777777    struct stat mystat; 
    778778    int view_at_line_number; 
    779779    char *include_target; 
    780     int include_target_len; 
     780    size_t include_target_len; 
    781781    gboolean have_type = FALSE; /* Flag used by regex_check_type() */ 
    782782 
    783783    if (filename_vpath == NULL) 
  • src/filemanager/file.c

    a b  
    890889        remain_bytes = ctx->progress_bytes - tctx->copied_bytes; 
    891890#if 1 
    892891        { 
    893             int total_secs = tv_current.tv_sec - tctx->transfer_start.tv_sec; 
     892            long total_secs = tv_current.tv_sec - tctx->transfer_start.tv_sec; 
    894893 
    895894            if (total_secs < 1) 
    896895                total_secs = 1; 
     
    14841483    gid_t src_gid = (gid_t) (-1); 
    14851484 
    14861485    int src_desc, dest_desc = -1; 
    1487     int n_read, n_written; 
     1486    ssize_t n_read, n_written; 
    14881487    mode_t src_mode = 0;        /* The mode of the source file */ 
    14891488    struct stat sb, sb2; 
    14901489    struct utimbuf utb; 
     
    17881787    { 
    17891788        off_t n_read_total = 0; 
    17901789        struct timeval tv_current, tv_last_update, tv_last_input; 
    1791         int secs, update_secs; 
     1790        long secs, update_secs; 
    17921791        const char *stalled_msg = ""; 
    17931792 
    17941793        tv_last_update = tv_transfer_start; 
  • src/filemanager/filegui.c

    a b  
    11701170                  gboolean only_one, 
    11711171                  const char *format, const void *text, const char *def_text, gboolean * do_bg) 
    11721172{ 
    1173     size_t fmd_xlen; 
     1173    int fmd_xlen; 
    11741174    vfs_path_t *vpath; 
    11751175    int source_easy_patterns = easy_patterns; 
    11761176    char fmd_buf[BUF_MEDIUM]; 
  • src/filemanager/find.c

    a b  
    966966    { 
    967967        int line = 1; 
    968968        int pos = 0; 
    969         int n_read = 0; 
     969        ssize_t n_read = 0; 
    970970        gboolean found = FALSE; 
    971971        gsize found_len; 
    972972        char result[BUF_MEDIUM]; 
  • src/filemanager/treestore.c

    a b  
    350350    { 
    351351        if (vfs_file_is_local (current->name)) 
    352352        { 
    353             int i, common; 
     353            int i; 
     354            size_t common; 
    354355 
    355356            /* Clear-text compression */ 
    356357            if (current->prev && (common = str_common (current->prev->name, current->name)) > 2) 
    357358            { 
    358359                char *encoded = encode (current->name, common); 
    359360 
    360                 i = fprintf (file, "%d:%d %s\n", current->scanned, common, encoded); 
     361                i = fprintf (file, "%d:%ld %s\n", current->scanned, common, encoded); 
    361362                g_free (encoded); 
    362363            } 
    363364            else 
     
    392393    tree_entry *current = ts.tree_first; 
    393394    tree_entry *old = NULL; 
    394395    tree_entry *new; 
    395     int submask = 0; 
     396    long submask = 0; 
    396397 
    397398    if (ts.tree_last && ts.tree_last->next) 
    398399        abort (); 
  • src/vfs/sftpfs/vfs_class.c

    a b  
    429429static ssize_t 
    430430sftpfs_cb_read (void *data, char *buffer, size_t count) 
    431431{ 
    432     int rc; 
     432    ssize_t rc; 
    433433    GError *mcerror = NULL; 
    434434    vfs_file_handler_t *fh = (vfs_file_handler_t *) data; 
    435435 
     
    457457static ssize_t 
    458458sftpfs_cb_write (void *data, const char *buf, size_t nbyte) 
    459459{ 
    460     int rc; 
     460    ssize_t rc; 
    461461    GError *mcerror = NULL; 
    462462    vfs_file_handler_t *fh = (vfs_file_handler_t *) data; 
    463463 
  • src/viewer/hex.c

    a b  
    116116    mark_t boldflag_char = MARK_NORMAL; 
    117117    struct hexedit_change_node *curr = view->change_list; 
    118118#ifdef HAVE_CHARSET 
    119     int cont_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 */ 
    120120    gboolean cjk_right = FALSE; /* whether the second byte of a CJK is to be processed */ 
    121121#endif /* HAVE_CHARSET */ 
    122122    gboolean utf8_changed = FALSE;      /* whether any of the bytes in the UTF-8 were changed */ 
  • src/editor/edit.c

    a b  
    16831683                              long *col1, long *col2) 
    16841684{ 
    16851685    off_t cursor; 
    1686     int col; 
     1686    long col; 
    16871687    off_t blocklen = -1, width = 0; 
    16881688    unsigned char *data; 
    16891689 
     
    23572357        && spm1 != edit->undo_stack_bottom 
    23582358        && ((sp - 2) & edit->undo_stack_size_mask) != edit->undo_stack_bottom) 
    23592359    { 
    2360         int d; 
     2360        long d; 
    23612361        if (edit->undo_stack[spm1] < 0) 
    23622362        { 
    23632363            d = edit->undo_stack[(sp - 2) & edit->undo_stack_size_mask]; 
     
    24362436        && spm1 != edit->redo_stack_bottom 
    24372437        && ((sp - 2) & edit->redo_stack_size_mask) != edit->redo_stack_bottom) 
    24382438    { 
    2439         int d; 
     2439        long d; 
    24402440        if (edit->redo_stack[spm1] < 0) 
    24412441        { 
    24422442            d = edit->redo_stack[(sp - 2) & edit->redo_stack_size_mask]; 
     
    29672967            fake_half_tabs = HALF_TAB_SIZE * space_width; 
    29682968            if (fake_half_tabs != 0 && edit->curs_col % fake_half_tabs != 0) 
    29692969            { 
    2970                 int q; 
     2970                long q; 
    29712971 
    29722972                q = edit->curs_col; 
    29732973                edit->curs_col -= (edit->curs_col % fake_half_tabs); 
  • src/editor/etags.c

    a b  
    188188    char *chekedstr = NULL; 
    189189 
    190190    int num = 0;                /* returned value */ 
    191     int pos; 
     191    size_t pos; 
    192192    char *filename = NULL; 
    193193 
    194194    if (!match_func || !tagfile) 
  • src/editor/format.c

    a b  
    298298/* --------------------------------------------------------------------------------------------- */ 
    299299/** find the start of a word */ 
    300300 
    301 static inline int 
     301static inline off_t 
    302302word_start (unsigned char *t, off_t q, off_t size) 
    303303{ 
    304304    off_t i; 
  • src/editor/syntax.c

    a b  
    254254                       const char *whole_left, const char *whole_right, long line_start) 
    255255{ 
    256256    const unsigned char *p, *q; 
    257     int c, d, j; 
     257    off_t j; 
     258    int c, d; 
    258259 
    259260    if (*text == '\0') 
    260261        return -1; 
     
    446447            while (*(p = xx_strchr (edit, (unsigned char *) p + 1, c)) != '\0') 
    447448            { 
    448449                syntax_keyword_t *k; 
    449                 int count; 
     450                long count; 
    450451                off_t e; 
    451452 
    452453                count = p - r->keyword_first_chars; 
     
    547548        while (*(p = xx_strchr (edit, (unsigned char *) p + 1, c)) != '\0') 
    548549        { 
    549550            syntax_keyword_t *k; 
    550             int count; 
     551            long count; 
    551552            off_t e; 
    552553 
    553554            count = p - r->keyword_first_chars; 
     
    12601261    FILE *f, *g = NULL; 
    12611262    char *args[1024], *l = NULL; 
    12621263    long line = 0; 
    1263     int result = 0; 
     1264    long result = 0; 
    12641265    char *lib_file; 
    12651266    gboolean found = FALSE; 
    12661267 
  • src/setup.c

    a b  
    690690        values = mc_config_get_string_list (cfg, section_name, *profile_keys, NULL); 
    691691        if (values != NULL) 
    692692        { 
    693             int action; 
    694  
    695             action = keybind_lookup_action (*profile_keys); 
     693            long action = keybind_lookup_action (*profile_keys); 
    696694            if (action > 0) 
    697695            { 
    698696                gchar **curr_values; 
  • src/subshell.c

    a b  
    462462feed_subshell (int how, int fail_on_error) 
    463463{ 
    464464    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' */ 
    466466    int i;                      /* Loop counter */ 
    467467 
    468468    struct timeval wtime;       /* Maximum time we wait for the subshell */ 
  • src/background.c

    a b  
    348348    } 
    349349    else if (type == Return_String) 
    350350    { 
    351         int len; 
     351        size_t len; 
    352352        char *resstr = NULL; 
    353353 
    354354        /* FIXME: string routines should also use the Foreground/Background 
  • lib/vfs/parse_ls_vga.c

    a b  
    8080static int 
    8181is_dos_date (const char *str) 
    8282{ 
    83     int len; 
     83    size_t len; 
    8484 
    8585    if (!str) 
    8686        return 0; 
     
    849849 
    850850    if (t) 
    851851    { 
    852         int p2 = strlen (t); 
     852        size_t p2 = strlen (t); 
    853853        if ((--p2 > 0) && (t[p2] == '\r' || t[p2] == '\n')) 
    854854            t[p2] = 0; 
    855855        if ((--p2 > 0) && (t[p2] == '\r' || t[p2] == '\n')) 
  • lib/strutil/strutil8bit.c

    a b  
    259259    static char result[BUF_MEDIUM]; 
    260260    char *actual; 
    261261    size_t remain; 
    262     int ident = 0; 
     262    size_t ident = 0; 
    263263    size_t length; 
    264264    size_t pos = 0; 
    265265 
     
    282282            break; 
    283283        } 
    284284 
    285         if ((int) remain <= ident) 
     285        if (remain <= ident) 
    286286            goto finally; 
    287287        memset (actual, ' ', ident); 
    288288        actual += ident; 
  • lib/strutil/strutilascii.c

    a b  
    211211    static char result[BUF_MEDIUM]; 
    212212    char *actual; 
    213213    size_t remain; 
    214     int ident = 0; 
     214    size_t ident = 0; 
    215215    size_t length; 
    216216    size_t pos = 0; 
    217217 
     
    235235        } 
    236236 
    237237        /* add space before text */ 
    238         if ((int) remain <= ident) 
     238        if (remain <= ident) 
    239239            goto finally; 
    240240        memset (actual, ' ', ident); 
    241241        actual += ident; 
  • lib/widget/menu.h

    a b  
    3434    gboolean is_active;         /* If the menubar is in use */ 
    3535    gboolean is_dropped;        /* If the menubar has dropped */ 
    3636    GList *menu;                /* The actual menus */ 
    37     size_t selected;            /* Selected menu on the top bar */ 
     37    guint selected;            /* Selected menu on the top bar */ 
    3838    unsigned long previous_widget;      /* Selected widget ID before activating menu */ 
    3939} WMenuBar; 
    4040 
  • src/vfs/tar/tar.c

    a b  
    235235 * 
    236236 * Result is -1 if the field is invalid (all blank, or nonoctal). 
    237237 */ 
    238 static long 
     238static int 
    239239tar_from_oct (int digs, char *where) 
    240240{ 
    241     long value; 
     241    int value; 
    242242 
    243243    while (isspace ((unsigned char) *where)) 
    244244    {                           /* Skip spaces */ 
     
    350350static union record * 
    351351tar_get_next_record (struct vfs_s_super *archive, int tard) 
    352352{ 
    353     int n; 
     353    ssize_t n; 
    354354 
    355355    (void) archive; 
    356356 
  • lib/tty/tty-ncurses.c

    a b  
    127127    struct mc_tty_lines_struct 
    128128    { 
    129129        const char *line; 
    130         int line_code; 
     130        chtype line_code; 
    131131    } const lines_codes[] = { 
    132132        {"\342\224\230", ACS_LRCORNER}, /* ┌ */ 
    133133        {"\342\224\224", ACS_LLCORNER}, /* └ */ 
  • lib/keybind.c

    a b  
    416416keybind_cmd_bind (GArray * keymap, const char *keybind, unsigned long action) 
    417417{ 
    418418    char *caption = NULL; 
    419     long key; 
     419    int key; 
    420420 
    421421    key = lookup_key (keybind, &caption); 
    422422    keymap_add (keymap, key, action, caption); 
  • lib/tty/key.c

    a b  
    14581458 * Return the code associated with the symbolic name keyname 
    14591459 */ 
    14601460 
    1461 long 
     1461int 
    14621462lookup_key (const char *name, char **label) 
    14631463{ 
    14641464    char **lc_keys, **p; 
     
    15671567    if (use_meta != -1) 
    15681568        k = ALT (k); 
    15691569 
    1570     return (long) k; 
     1570    return k; 
    15711571} 
    15721572 
    15731573/* --------------------------------------------------------------------------------------------- */ 
  • lib/tty/key.h

    a b  
    7575void init_key_input_fd (void); 
    7676void done_key (void); 
    7777 
    78 long lookup_key (const char *name, char **label); 
     78int lookup_key (const char *name, char **label); 
    7979char *lookup_key_by_code (const int keycode); 
    8080/* mouse support */ 
    8181int tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block); 
  • src/setup.c

    a b  
    619619    char *section_name; 
    620620    gchar **profile_keys, **keys; 
    621621    char *valcopy, *value; 
    622     long key_code; 
     622    int key_code; 
    623623 
    624624    if (terminal == NULL) 
    625625        return; 
  • src/vfs/fish/fish.c

    a b  
    395395                ERRNOR (ECONNRESET, FALSE); 
    396396            if (strncmp (buffer, "### ", 4) == 0) 
    397397                break; 
    398             SUP->host_flags = atol (buffer); 
     398            SUP->host_flags = atoi (buffer); 
    399399        } 
    400400        return TRUE; 
    401401    } 
  • src/vfs/undelfs/undelfs.c

    a b  
    104104{ 
    105105    int f_index;                /* file index into delarray */ 
    106106    char *buf; 
    107     int error_code;             /*  */ 
     107    errcode_t error_code;             /*  */ 
    108108    off_t pos;                  /* file position */ 
    109109    off_t current;              /* used to determine current position in itereate */ 
    110110    gboolean finished; 
     
    230230static int 
    231231undelfs_loaddel (void) 
    232232{ 
    233     int retval, count; 
     233    int count; 
     234    errcode_t retval; 
    234235    ext2_ino_t ino; 
    235236    struct ext2_inode inode; 
    236237    ext2_inode_scan scan; 
     
    252253    retval = ext2fs_open_inode_scan (fs, 0, &scan); 
    253254    if (retval != 0) 
    254255    { 
    255         message (D_ERROR, undelfserr, _("open_inode_scan: %d"), retval); 
     256        message (D_ERROR, undelfserr, _("open_inode_scan: %ld"), retval); 
    256257        goto free_block_buf; 
    257258    } 
    258259    retval = ext2fs_get_next_inode (scan, &ino, &inode); 
    259260    if (retval != 0) 
    260261    { 
    261         message (D_ERROR, undelfserr, _("while starting inode scan %d"), retval); 
     262        message (D_ERROR, undelfserr, _("while starting inode scan %ld"), retval); 
    262263        goto error_out; 
    263264    } 
    264265    count = 0; 
     
    280281        retval = ext2fs_block_iterate (fs, ino, 0, block_buf, undelfs_lsdel_proc, &lsd); 
    281282        if (retval) 
    282283        { 
    283             message (D_ERROR, undelfserr, _("while calling ext2_block_iterate %d"), retval); 
     284            message (D_ERROR, undelfserr, _("while calling ext2_block_iterate %ld"), retval); 
    284285            goto next; 
    285286        } 
    286287        if (lsd.free_blocks && !lsd.bad_blocks) 
     
    314315        retval = ext2fs_get_next_inode (scan, &ino, &inode); 
    315316        if (retval) 
    316317        { 
    317             message (D_ERROR, undelfserr, _("while doing inode scan %d"), retval); 
     318            message (D_ERROR, undelfserr, _("while doing inode scan %ld"), retval); 
    318319            goto error_out; 
    319320        } 
    320321    } 
     
    453454        g_free (f); 
    454455        return 0; 
    455456    } 
    456     inode = atol (f); 
     457    inode = atoi (f); 
    457458 
    458459    /* Search the file into delarray */ 
    459460    for (i = 0; i < (ext2_ino_t) num_delarray; i++) 
     
    507508static int 
    508509undelfs_dump_read (ext2_filsys param_fs, blk_t * blocknr, int blockcnt, void *private) 
    509510{ 
    510     int copy_count; 
     511    size_t copy_count; 
    511512    undelfs_file *p = (undelfs_file *) private; 
    512513 
    513514    if (blockcnt < 0) 
     
    580581undelfs_read (void *vfs_info, char *buffer, size_t count) 
    581582{ 
    582583    undelfs_file *p = vfs_info; 
    583     int retval; 
     584    errcode_t retval; 
    584585 
    585586    p->dest_buffer = buffer; 
    586587    p->current = 0; 
     
    605606 
    606607/* --------------------------------------------------------------------------------------------- */ 
    607608 
    608 static long 
     609static int 
    609610undelfs_getindex (char *path) 
    610611{ 
    611     ext2_ino_t inode = atol (path); 
     612    ext2_ino_t inode = atoi (path); 
    612613    int i; 
    613614 
    614615    for (i = 0; i < num_delarray; i++) 
  • src/filemanager/usermenu.c

    a b  
    530530        { 
    531531            if (*commands == '%') 
    532532            { 
    533                 int i = check_format_view (commands + 1); 
     533                long i = check_format_view (commands + 1); 
    534534                if (i) 
    535535                { 
    536536                    commands += i; 
     
    632632 */ 
    633633 
    634634/* Returns how many characters we should advance if %view was found */ 
    635 int 
     635long 
    636636check_format_view (const char *p) 
    637637{ 
    638638    const char *q = p; 
     
    674674 
    675675/* --------------------------------------------------------------------------------------------- */ 
    676676 
    677 int 
     677long 
    678678check_format_cd (const char *p) 
    679679{ 
    680680    return (strncmp (p, "cd", 2)) ? 0 : 3; 
     
    685685/* Returns the number of skipped characters (zero on not found) */ 
    686686/* V will be set to the expanded variable name */ 
    687687 
    688 int 
     688long 
    689689check_format_var (const char *p, char **v) 
    690690{ 
    691691    const char *q = p; 
  • src/filemanager/usermenu.h

    diff -ruN a/src/filemanager/usermenu.h b/src/filemanager/usermenu.h
    a b  
    2121 
    2222gboolean user_menu_cmd (struct WEdit *edit_widget, const char *menu_file, int selected_entry); 
    2323char *expand_format (struct WEdit *edit_widget, char c, gboolean do_quote); 
    24 int check_format_view (const char *); 
    25 int check_format_var (const char *, char **); 
    26 int check_format_cd (const char *); 
     24long check_format_view (const char *); 
     25long check_format_var (const char *, char **); 
     26long check_format_cd (const char *); 
    2727 
    2828/*** inline functions ****************************************************************************/ 
    2929 
  • lib/vfs/vfs.c

    a b  
    111111 */ 
    112112 
    113113static estr_t 
    114 _vfs_translate_path (const char *path, int size, GIConv defcnv, GString * buffer) 
     114_vfs_translate_path (const char *path, long size, GIConv defcnv, GString * buffer) 
    115115{ 
    116116    estr_t state = ESTR_SUCCESS; 
    117117#ifdef HAVE_CHARSET 
     
    129129        char encoding[16]; 
    130130        const char *slash; 
    131131        GIConv coder = INVALID_CONV; 
    132         int ms; 
     132        long ms; 
    133133 
    134134        /* first must be translated part before #enc: */ 
    135135        ms = semi - path;