[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
warning: case value '0' not in enumerated
From: |
Bruce Korb |
Subject: |
warning: case value '0' not in enumerated |
Date: |
Sat, 07 Feb 2015 12:02:09 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
gc-gnulib.c: In function 'gc_hash_open':
gc-gnulib.c:669:5: warning: case value '0' not in enumerated type
'Gc_hash_mode' [-Wswitch]
case 0:
^
diff --git a/lib/gc-gnulib.c b/lib/gc-gnulib.c
index a1276c9..ee60f85 100644
--- a/lib/gc-gnulib.c
+++ b/lib/gc-gnulib.c
@@ -664,15 +664,8 @@ gc_hash_open (Gc_hash hash, Gc_hash_mode mode,
gc_hash_handle * outhandle)
break;
}
- switch (mode)
- {
- case 0:
- break;
-
- default:
- rc = GC_INVALID_HASH;
- break;
- }
+ if (mode != 0)
+ rc = GC_INVALID_HASH;
if (rc == GC_OK)
*outhandle = ctx;
That, or add to the definition of enum Gc_hash_mode:
GC_HMUNKNOWN = 0
- warning: case value '0' not in enumerated,
Bruce Korb <=