diff options
Diffstat (limited to 'autotab.c')
-rw-r--r-- | autotab.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -419,7 +419,7 @@ static long compute_alignment_score(line_t *lines, int shiftwidth) lines = next, next = next ? next->next : 0, lineno0 = lineno1++) { char *str0 = lines->str; - size_t len0 = strlen(str0); + long len0 = strlen(str0); long tnd0 = strspn(str0, LETAB); /* leading space generated by tabs */ long ind0 = strspn(str0, ANYSP); /* indentation */ long int0 = strcspn(str0, INTAB); /* position of first inner tab */ @@ -440,7 +440,7 @@ static long compute_alignment_score(line_t *lines, int shiftwidth) for (; next && lineno1 - lineno0 <= 4; next = next->next, lineno1++) { char *str1 = next->str; - size_t len1 = strlen(str1); + long len1 = strlen(str1); long tnd1 = strspn(str1, LETAB); long ind1 = strspn(str1, ANYSP); long int1 = strcspn(str1, INTAB); @@ -642,7 +642,7 @@ static int determine_shiftwidth(line_t *lines_in, int tabsize, int munged) /* Indentation out of column zero tabulated separately. Consider only if second line goes beyond previous line, or if the indentation does not suspiciously look like alignment. */ - if (strlen(str0) < ind1 || + if (strlen(str0) < (size_t) ind1 || !(strchr(ANYSP, str0[ind1 - 1]) != 0 && strchr(ANYSP, str0[ind1]) == 0)) zerocol_hist[move]++; |