]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: quell sparse "warning: Using plain integer as NULL pointer"
authorPhil Carmody <phil@dovecot.fi>
Mon, 5 May 2014 12:09:27 +0000 (15:09 +0300)
committerPhil Carmody <phil@dovecot.fi>
Mon, 5 May 2014 12:09:27 +0000 (15:09 +0300)
The first element of the structure is a pointer, make that explicit.

src/lib/array-decl.h

index a8c2f90d3aca1fe39f770d97845f88577633f97a..f98b3703c10059b72eab40ab0f1608b630721ede 100644 (file)
@@ -2,7 +2,7 @@
 #define ARRAY_DECL_H
 
 #define ARRAY(array_type) union { struct array arr; array_type const *const *v; array_type **v_modifiable; }
-#define ARRAY_INIT { { 0, 0 } }
+#define ARRAY_INIT { { NULL, 0 } }
 
 #define ARRAY_DEFINE_TYPE(name, array_type) \
        union array ## __ ## name { struct array arr; array_type const *const *v; array_type **v_modifiable; }