{"author":"Viktor Szakats","author_email":"commit@vsz.me","author_time":1739238389,"commit_time":1739669975,"committer":"Viktor Szakats","committer_email":"commit@vsz.me","hash":"ca2f49ded03426a246b3db7833592157cdd7f597","message":"build: fix compiler warnings in feature detections\n\nFix or silence compiler warnings happening in feature detections\nto reduce log noise. Warnings may also get promoted to errors in certain\ncases, causing missed detections.\n\nIt reduces the number of warnings by 4500+ across the linux, linux-old,\nmacos, non-native and windows GHA workflows (~142 jobs).\n\nAlso move picky warning logic for MSVC/Borland to\n`CMake/PickyWarnings.cmake. To make them listed in the picky-warnings\nlog output, and to also apply to feature detections to make them compile\nunder the same conditions as source code. The hope is to help catching\nissues faster. It also improves code quality of feature tests.\n\nFixed/silenced:\n```\nwarning #177: variable \"dummy\" was declared but never referenced\nwarning #177: variable \"flag\" was declared but never referenced\nwarning #177: variable \"res\" was declared but never referenced\nwarning #592: variable \"s\" is used before its value is set\nwarning #1011: missing return statement at end of non-void function \"main\"\nwarning #1786: function \"SSL_CTX_set_srp_password\" (declared at line 1888 of \"/usr/include/openssl/ssl.h\") was declared deprecated (\"Since OpenSSL 3.0\")\nwarning #1786: function \"SSL_CTX_set_srp_username\" (declared at line 1887 of \"/usr/include/openssl/ssl.h\") was declared deprecated (\"Since OpenSSL 3.0\")\nwarning #2332: a value of type \"const char *\" cannot be assigned to an entity of type \"char *\" (dropping qualifiers)\nwarning: 'SSL_CTX_set_srp_password' is deprecated [-Wdeprecated-declarations]\nwarning: 'SSL_CTX_set_srp_password' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\nwarning: 'SSL_CTX_set_srp_username' is deprecated [-Wdeprecated-declarations]\nwarning: 'SSL_CTX_set_srp_username' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\nwarning: 'b' is used uninitialized [-Wuninitialized]\nwarning: 'gethostname' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]\nwarning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn]\nwarning: Value stored to 'i' is never read [deadcode.DeadStores]\nwarning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]\nwarning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]\nwarning: control reaches end of non-void function [-Wreturn-type]\nwarning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]\nwarning: excess elements in struct initializer\nwarning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]\nwarning: macro \"_FILE_OFFSET_BITS\" is not used [-Wunused-macros]\nwarning: macro \"_REENTRANT\" is not used [-Wunused-macros]\nwarning: missing braces around initializer [-Wmissing-braces]\nwarning: no previous extern declaration for non-static variable 'off_t_is_large' [-Wmissing-variable-declarations]\nwarning: no previous prototype for 'check' [-Wmissing-prototypes]\nwarning: no previous prototype for function 'check' [-Wmissing-prototypes]\nwarning: null argument where non-null required (argument 2) [-Wnonnull]\nwarning: passing 'const char[1]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]\nwarning: passing argument 2 of 'SSL_CTX_set_srp_password' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]\nwarning: passing argument 2 of 'SSL_CTX_set_srp_username' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]\nwarning: unused parameter 'c' [-Wunused-parameter]\nwarning: unused parameter 'f' [-Wunused-parameter]\nwarning: unused variable 'data' [-Wunused-variable]\nwarning: unused variable 'dummy' [-Wunused-variable]\nwarning: unused variable 'flag' [-Wunused-variable]\nwarning: unused variable 'res' [-Wunused-variable]\nwarning: unused variable 's' [-Wunused-variable]\nwarning: variable 's' set but not used [-Wunused-but-set-variable]\nwarning: variable 'ts' set but not used [-Wunused-but-set-variable]\n```\n\nCloses #16287\n","parents":["ebbf51e19111971038e105aa5bf04ac300972335"],"tree_hash":"a41876fc08e883c1e846f53fb81d40cb9779be59"}