]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: stats: conditionally mark obsolete stats states as deprecated
authorWilly Tarreau <w@1wt.eu>
Mon, 9 May 2022 17:46:35 +0000 (19:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 May 2022 18:32:11 +0000 (20:32 +0200)
The obsolete stats states STAT_ST_* were marked as deprecated with recent
commit 6ef1648dc ("CLEANUP: stats: rename the stats state values an mark
the old ones deprecated"), except that this feature requires gcc 6 and
above. Let's use the macro that depends on this condition instead.

The issue appeared on 2.6-dev9 so no backport is needed.

include/haproxy/stats-t.h

index 61c756a3e9a71ddcd13f2f29e9f091674f29bd1d..efa0ac3839d917a2d90d5597ecad9749d37b2d2e 100644 (file)
@@ -135,12 +135,12 @@ enum stat_state {
  * please do not use these values anymore and defined your own!
  */
 enum obsolete_stat_state {
-       STAT_ST_INIT __attribute__((deprecated)) = 0,
-       STAT_ST_HEAD __attribute__((deprecated)),
-       STAT_ST_INFO __attribute__((deprecated)),
-       STAT_ST_LIST __attribute__((deprecated)),
-       STAT_ST_END  __attribute__((deprecated)),
-       STAT_ST_FIN  __attribute__((deprecated)),
+       STAT_ST_INIT ENUM_ATTRIBUTE((deprecated)) = 0,
+       STAT_ST_HEAD ENUM_ATTRIBUTE((deprecated)),
+       STAT_ST_INFO ENUM_ATTRIBUTE((deprecated)),
+       STAT_ST_LIST ENUM_ATTRIBUTE((deprecated)),
+       STAT_ST_END  ENUM_ATTRIBUTE((deprecated)),
+       STAT_ST_FIN  ENUM_ATTRIBUTE((deprecated)),
 };
 
 /* data transmission states for the stats responses inside a proxy */