mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-26 09:58:03 +02:00
PHPC-285: Fix syntax for empty struct initializer
While "{ 0 }" should be sufficient, gcc's missing-braces warning requires that an extra pair of braces be used.
See: http://stackoverflow.com/q/11551986 and http://stackoverflow.com/a/20405554
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ typedef struct {
|
||||
} php_phongo_bson_state;
|
||||
|
||||
#if PHP_VERSION_ID >= 70000
|
||||
#define PHONGO_BSON_STATE_INITIALIZER { {}, { PHONGO_TYPEMAP_NONE, NULL, PHONGO_TYPEMAP_NONE, NULL, PHONGO_TYPEMAP_NONE, NULL}, NULL}
|
||||
#define PHONGO_BSON_STATE_INITIALIZER { {{ 0 }}, { PHONGO_TYPEMAP_NONE, NULL, PHONGO_TYPEMAP_NONE, NULL, PHONGO_TYPEMAP_NONE, NULL}, NULL}
|
||||
#else
|
||||
#define PHONGO_BSON_STATE_INITIALIZER { NULL, { PHONGO_TYPEMAP_NONE, NULL, PHONGO_TYPEMAP_NONE, NULL, PHONGO_TYPEMAP_NONE, NULL}, NULL}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user