From: 'noloader' Date: Sat, 21 Sep 2013 14:19:37 +0000 (+1200) Subject: Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration X-Git-Tag: SQUID_3_5_0_1~636 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4f1ea43f9a9275f33c97ea2862d9ca6b1546ff1;p=thirdparty%2Fsquid.git Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration --- diff --git a/src/cbdata.h b/src/cbdata.h index 51de95e2d0..f480596ee1 100644 --- a/src/cbdata.h +++ b/src/cbdata.h @@ -224,14 +224,12 @@ /** *\ingroup CBDATAAPI - * cbdata types. similar to the MEM_* types above, but managed - * in cbdata.c. A big difference is that these types are dynamically - * allocated. This list is only a list of predefined types. Other types - * are added runtime + * cbdata types. Similar to the MEM_* types, but managed in cbdata.cc + * A big difference is that cbdata types are dynamically allocated. + * Initially only UNKNOWN type is predefined. Other types are added runtime. */ -typedef enum { - CBDATA_UNKNOWN = 0 -} cbdata_type; +typedef int cbdata_type; +static const cbdata_type CBDATA_UNKNOWN = 0; /// \ingroup CBDATAAPI void cbdataRegisterWithCacheManager(void);