]> git.ipfire.org Git - thirdparty/curl.git/commit
typecheck: accept expressions for option/info parameters
authorPatrick Monnerat <patrick@monnerat.net>
Fri, 23 Dec 2022 14:35:27 +0000 (15:35 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 26 Dec 2022 09:04:55 +0000 (10:04 +0100)
commite2aed004302e51cfa5b6ce8c8ab65ef92aa83196
tree167a58b5713efc780580592fdb65970685cf8703
parentef07452a5cc379e90c55a16ffa3a313b03f78df5
typecheck: accept expressions for option/info parameters

As expressions can have side effects, evaluate only once.

To enable deprecation reporting only once, get rid of the __typeof__
use to define the local temporary variable and use the target type
(CURLoption/CURLINFO). This also avoids multiple reports on type
conflicts (if some) by the curlcheck_* macros.

Note that CURLOPT_* and CURLINFO_* symbols may be deprecated, but not
their values: a curl_easy_setopt call with an integer constant as option
will never report a deprecation.

Reported-by: Thomas Klausner
Fixes #10148
Closes #10149
include/curl/typecheck-gcc.h