------------------------------------------------------------ revno: 12632 revision-id: squid3@treenet.co.nz-20130929181317-5o5tg7c19twhzeh6 parent: squid3@treenet.co.nz-20130929181226-ozw7wadjmj1z4xdw fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=3923 author: 'noloader' committer: Amos Jeffries branch nick: 3.3 timestamp: Sun 2013-09-29 12:13:17 -0600 message: Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130929181317-5o5tg7c19twhzeh6 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 0e00cec8657a791c2001b65e430f05d96a50677d # timestamp: 2013-09-29 18:13:26 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130929181226-\ # ozw7wadjmj1z4xdw # # Begin patch === modified file 'src/cbdata.h' --- src/cbdata.h 2012-09-21 14:57:30 +0000 +++ src/cbdata.h 2013-09-29 18:13:17 +0000 @@ -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);