Merge pull request #61 from fgsch/issue_60
Silence warning with -Wextra
This commit is contained in:
commit
6b510deff2
@ -436,7 +436,8 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose(
|
|||||||
if (decomp_result < 0) return decomp_result;
|
if (decomp_result < 0) return decomp_result;
|
||||||
wpos += decomp_result;
|
wpos += decomp_result;
|
||||||
/* prohibiting integer overflows due to too long strings: */
|
/* prohibiting integer overflows due to too long strings: */
|
||||||
if (wpos < 0 || wpos > SSIZE_MAX/sizeof(utf8proc_int32_t)/2)
|
if (wpos < 0 ||
|
||||||
|
wpos > (utf8proc_ssize_t)(SSIZE_MAX/sizeof(utf8proc_int32_t)/2))
|
||||||
return UTF8PROC_ERROR_OVERFLOW;
|
return UTF8PROC_ERROR_OVERFLOW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user