Commit 5eb65b1
committed
http: Avoid undefined behavior in va_arg conversion
Subtracting a null pointer is undefined behavior according to
Clang 13 (-Wnull-pointer-subtraction). Avoid this by casting to
intptr_t instead.
Request macros (e.g. OP_GET_SERVER_INFO) already do a simple cast
`((char*)_request)` rather than addition with null pointer
`(_request+(char*)NULL)` so nothing needs to be changed on that end.1 parent cf218fb commit 5eb65b1
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3466 | 3466 | | |
3467 | 3467 | | |
3468 | 3468 | | |
3469 | | - | |
3470 | | - | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
3471 | 3472 | | |
3472 | | - | |
| 3473 | + | |
| 3474 | + | |
3473 | 3475 | | |
3474 | 3476 | | |
3475 | 3477 | | |
| |||
0 commit comments