diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-05-03 16:57:52 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-05-03 16:57:52 +0100 |
commit | c85520427133b531b6ceb58fd5dcb0ad10329bca (patch) | |
tree | 8a2649eabb8546fe52a0d2d060a46662ea2653b3 /src/static_libs | |
parent | 3d374692f7dcdea4e7fb18b77ecf32d39fb367db (diff) | |
download | efl-c85520427133b531b6ceb58fd5dcb0ad10329bca.tar.gz |
fnmatch - fix warnings coming from original src so less noise
Diffstat (limited to 'src/static_libs')
-rw-r--r-- | src/static_libs/fnmatch/fnmatch.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/static_libs/fnmatch/fnmatch.c b/src/static_libs/fnmatch/fnmatch.c index 089ccb5cbf..c562a95cf6 100644 --- a/src/static_libs/fnmatch/fnmatch.c +++ b/src/static_libs/fnmatch/fnmatch.c @@ -36,7 +36,7 @@ static int str_next(const char *str, size_t n, size_t *step) *step = 0; return 0; } - if (str[0] >= 128U) { + if ((unsigned)str[0] >= 128U) { wchar_t wc; int k = mbtowc(&wc, str, n); if (k<0) { @@ -89,7 +89,7 @@ static int pat_next(const char *pat, size_t m, size_t *step, int flags) if (pat[0] == '?') return QUESTION; escaped: - if (pat[0] >= 128U) { + if ((unsigned)pat[0] >= 128U) { wchar_t wc; int k = mbtowc(&wc, pat, m); if (k<0) { @@ -105,7 +105,7 @@ escaped: static int casefold(int k) { int c = towupper(k); - return c == k ? towlower(k) : c; + return c == k ? (int)towlower(k) : c; } static int match_bracket(const char *p, int k, int kfold) @@ -131,8 +131,8 @@ static int match_bracket(const char *p, int k, int kfold) int l = mbtowc(&wc2, p+1, 4); if (l < 0) return 0; if (wc <= wc2) - if ((unsigned)k-wc <= wc2-wc || - (unsigned)kfold-wc <= wc2-wc) + if ((unsigned)k-wc <= (unsigned)wc2-wc || + (unsigned)kfold-wc <= (unsigned)wc2-wc) return !inv; p += l-1; continue; @@ -152,7 +152,7 @@ static int match_bracket(const char *p, int k, int kfold) } continue; } - if (*p < 128U) { + if ((unsigned)*p < 128U) { wc = (unsigned char)*p; } else { int l = mbtowc(&wc, p, 4); @@ -234,7 +234,7 @@ static int fnmatch_internal(const char *pat, size_t m, const char *str, size_t n * On illegal sequences we may get it wrong, but in that case * we necessarily have a matching failure anyway. */ for (s=endstr; s>str && tailcnt; tailcnt--) { - if (s[-1] < 128U || MB_CUR_MAX==1) s--; + if ((unsigned)s[-1] < 128U || MB_CUR_MAX==1) s--; else while ((unsigned char)*--s-0x80U<0x40 && s>str); } if (tailcnt) return __FNM_NOMATCH; |