]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: cache: fix a build warning regarding too large an integer for the age
authorWilly Tarreau <w@1wt.eu>
Sun, 11 Nov 2018 13:00:28 +0000 (14:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Nov 2018 13:03:02 +0000 (14:03 +0100)
commit96062a181db0f00bb14898e1ec40072ebefa9855
treefe83d4c47660a290d27bb667caffd1718eb8e700
parent96079492e0200e9ee4bb682c8f0b5e945068a0d4
BUILD: cache: fix a build warning regarding too large an integer for the age

Building on 32 bit gives this :

  src/cache.c: In function 'http_action_store_cache':
  src/cache.c:466:4: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]
  src/cache.c:467:5: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]
  src/cache.c: In function 'cache_channel_append_age_header':
  src/cache.c:578:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]
  src/cache.c:579:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]

It's because of the definition below added in commit e7a770c ("MINOR:
cache: Add "Age" header.") :

  #define CACHE_ENTRY_MAX_AGE 2147483648

Just appending "U" to mark it unsigned is enough to fix it. This only
affects 1.9, no backport is needed.
src/cache.c