This repository was archived by the owner on Nov 6, 2022. It is now read-only.
Commit b6866a7
committed
Fix -Wsign-compare warning
Commit 2a0d106 ("http_parser: revert `memchr()` optimization")
introduced a -Wsign-compare warning that manifests itself with
gcc 7.4.0 but not older versions.
The type of p - q is signed when p and q are pointers and was
compared against an unsigned type. Its actual value is always >= 0
however and can be safely cast to size_t.
Fixes: #471
PR-URL: #472
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>1 parent c5c4563 commit b6866a7
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
1500 | | - | |
| 1500 | + | |
| 1501 | + | |
1501 | 1502 | | |
1502 | | - | |
| 1503 | + | |
1503 | 1504 | | |
1504 | 1505 | | |
1505 | 1506 | | |
| |||
0 commit comments