diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2025-09-16 15:12:57 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2025-09-16 15:12:57 (GMT) |
| commit | 5e3388d323a49bae302ed7ff346f6d8b09918e78 (patch) | |
| tree | 0ece9020450f1dae3d304e4985f66f1a7b723dfc | |
| parent | e1bcd09365bce9dc8865963f4336456968711f60 (diff) | |
| parent | 50b330fbec4f9c2f5aaa93addf7bd016d9e783f3 (diff) | |
| download | tcl-5e3388d323a49bae302ed7ff346f6d8b09918e78.zip tcl-5e3388d323a49bae302ed7ff346f6d8b09918e78.tar.gz tcl-5e3388d323a49bae302ed7ff346f6d8b09918e78.tar.bz2 | |
The option -Wunused-but-set-variable appears to be usable starting clang 15
| -rw-r--r-- | generic/tclDate.c | 19 | ||||
| -rw-r--r-- | generic/tclGetDate.y | 3 |
2 files changed, 12 insertions, 10 deletions
diff --git a/generic/tclDate.c b/generic/tclDate.c index 84824b6..0dfdb81 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -96,7 +96,8 @@ #ifdef _MSC_VER #pragma warning( disable : 4102 ) -#elif defined (__clang__) +#elif defined (__clang__) && (__clang_major__ > 14) +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #elif (__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif @@ -719,14 +720,14 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 174, 174, 175, 179, 182, 185, 188, 192, 196, - 199, 202, 206, 209, 214, 220, 226, 231, 235, 239, - 243, 247, 251, 257, 258, 261, 265, 269, 273, 277, - 281, 287, 293, 297, 302, 303, 308, 312, 317, 321, - 326, 333, 337, 343, 343, 345, 350, 355, 357, 362, - 364, 365, 373, 384, 399, 404, 407, 410, 413, 416, - 419, 422, 427, 430, 435, 440, 445, 452, 455, 458, - 463, 481, 484 + 0, 175, 175, 176, 180, 183, 186, 189, 193, 197, + 200, 203, 207, 210, 215, 221, 227, 232, 236, 240, + 244, 248, 252, 258, 259, 262, 266, 270, 274, 278, + 282, 288, 294, 298, 303, 304, 309, 313, 318, 322, + 327, 334, 338, 344, 344, 346, 351, 356, 358, 363, + 365, 366, 374, 385, 400, 405, 408, 411, 414, 417, + 420, 423, 428, 431, 436, 441, 446, 453, 456, 459, + 464, 482, 485 }; #endif diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index a86250f..2b71af4 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -45,7 +45,8 @@ #ifdef _MSC_VER #pragma warning( disable : 4102 ) -#elif defined (__clang__) +#elif defined (__clang__) && (__clang_major__ > 14) +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #elif (__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif |
