]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: 51d: fix warning when building with 51Degrees release version 3.2.12.12
authorDragan Dosen <ddosen@haproxy.com>
Wed, 27 Sep 2017 10:46:44 +0000 (12:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Oct 2017 09:23:38 +0000 (11:23 +0200)
The warning appears when building with 51Degrees release that uses a new
Hash Trie algorithm (release version 3.2.12.12):

src/51d.c: In function init_51degrees:
src/51d.c:566:2: warning: enumeration value DATA_SET_INIT_STATUS_TOO_MANY_OPEN_FILES not handled in switch [-Wswitch]
  switch (_51d_dataset_status) {
  ^

This patch can be backported in 1.7.

src/51d.c

index 421c0de1284f01691960de8adea47ae010cdeeca..1f1a5f9690a5810fd6008f844fae95798f2f0aba 100644 (file)
--- a/src/51d.c
+++ b/src/51d.c
@@ -605,6 +605,9 @@ static int init_51degrees(void)
                case DATA_SET_INIT_STATUS_NOT_SET:
                        chunk_printf(temp, "Data set not initialised.");
                        break;
+               default:
+                       chunk_printf(temp, "Other error.");
+                       break;
        }
        if (_51d_dataset_status != DATA_SET_INIT_STATUS_SUCCESS) {
                if (temp->len)