Fixed: warning: missing braces around initializer
authorTrond Norbye <trond.norbye@sun.com>
Mon, 4 Aug 2008 07:24:49 +0000 (09:24 +0200)
committerTrond Norbye <trond.norbye@sun.com>
Mon, 4 Aug 2008 07:24:49 +0000 (09:24 +0200)
libmemcached/memcached_auto.c
libmemcached/memcached_delete.c
libmemcached/memcached_flush.c
libmemcached/memcached_get.c
libmemcached/memcached_quit.c
libmemcached/memcached_stats.c
libmemcached/memcached_storage.c
libmemcached/memcached_version.c

index 449d4c4e23b5f6f341986f4885143c9fe63a9366..f67b62981f72a8a361a617dde554882215522548 100644 (file)
@@ -79,7 +79,7 @@ static memcached_return binary_incr_decr(memcached_st *ptr, uint8_t cmd,
 
   server_key= memcached_generate_hash(ptr, key, key_length);
 
-  protocol_binary_request_incr request= {0};
+  protocol_binary_request_incr request= {.bytes= {0}};
 
   request.message.header.request.magic= PROTOCOL_BINARY_REQ;
   request.message.header.request.opcode= cmd;
index 5ec2fca31891cf3803d5856ebd7694de71f6ef29..3e1390fa56d71fe6e78874a79af664c6710a4106 100644 (file)
@@ -88,7 +88,7 @@ static inline memcached_return binary_delete(memcached_st *ptr,
                                             size_t key_length,
                                             int flush)
 {
-  protocol_binary_request_delete request= {0};
+  protocol_binary_request_delete request= {.bytes= {0}};
 
   request.message.header.request.magic= PROTOCOL_BINARY_REQ;
   request.message.header.request.opcode= PROTOCOL_BINARY_CMD_DELETE;
index f722cc904e6ea9835d4d8bbb1d40f004a1f1024b..4e048d00260e279858493167f98e05831797b967 100644 (file)
@@ -51,7 +51,7 @@ static memcached_return memcached_flush_binary(memcached_st *ptr,
                                                time_t expiration)
 {
   unsigned int x;
-  protocol_binary_request_flush request= {0};
+  protocol_binary_request_flush request= {.bytes= {0}};
 
   unlikely (ptr->number_of_hosts == 0)
     return MEMCACHED_NO_SERVERS;
index a84ef4f2a12c2416c49748e93580f61e875bc779..a01beee62e954f57235466c05bf9ce885207595f 100644 (file)
@@ -274,7 +274,7 @@ static memcached_return binary_mget_by_key(memcached_st *ptr,
         continue;
     }
      
-    protocol_binary_request_getk request= {0};
+    protocol_binary_request_getk request= {.bytes= {0}};
     request.message.header.request.magic= PROTOCOL_BINARY_REQ;
     if (number_of_keys == 1)
       request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETK;
@@ -302,7 +302,7 @@ static memcached_return binary_mget_by_key(memcached_st *ptr,
     /*
      * Send a noop command to flush the buffers
      */
-    protocol_binary_request_noop request= {0};
+    protocol_binary_request_noop request= {.bytes= {0}};
     request.message.header.request.magic= PROTOCOL_BINARY_REQ;
     request.message.header.request.opcode= PROTOCOL_BINARY_CMD_NOOP;
     request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
index a3d114b3e1984a9d23c5f768e425e8f061583627..c30b1ccdfc6923a91734deeb954b2c9598fff352 100644 (file)
@@ -21,7 +21,7 @@ void memcached_quit_server(memcached_server_st *ptr, uint8_t io_death)
 
       if (ptr->root->flags & MEM_BINARY_PROTOCOL) 
       {
-        protocol_binary_request_quit request = {0};
+        protocol_binary_request_quit request = {.bytes= {0}};
         request.message.header.request.magic = PROTOCOL_BINARY_REQ;
         request.message.header.request.opcode = PROTOCOL_BINARY_CMD_QUIT;
         request.message.header.request.datatype = PROTOCOL_BINARY_RAW_BYTES;
index f8cfdbda0f45a4540f95fdb7440b2499ea32635f..1b5576e7f072a2bbe3e8f54ef7a80a7a51ba2b43 100644 (file)
@@ -219,7 +219,7 @@ static memcached_return binary_stats_fetch(memcached_st *ptr,
   memcached_return rc;
 
   char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  protocol_binary_request_stats request= {0};
+  protocol_binary_request_stats request= {.bytes= {0}};
   request.message.header.request.magic= PROTOCOL_BINARY_REQ;
   request.message.header.request.opcode= PROTOCOL_BINARY_CMD_STAT;
   request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
index 326f6fe6f723bbe027902ad94f94ae5fef40662a..d42124d7a13b47905edd8a885ca23a379353d243 100644 (file)
@@ -329,7 +329,7 @@ static memcached_return memcached_send_binary(memcached_server_st* server,
                                               uint64_t cas,
                                               memcached_storage_action verb)
 {
-  protocol_binary_request_set request= {0};
+  protocol_binary_request_set request= {.bytes= {0}};
   size_t send_length= sizeof(request.bytes);
 
   request.message.header.request.magic= PROTOCOL_BINARY_REQ;
index 182ff14e316da66983f75cc4625379645c67f622..0a77529c7d1ed5ab1926c903a774fe0082728791 100644 (file)
@@ -63,7 +63,7 @@ static inline memcached_return memcached_version_binary(memcached_st *ptr)
 {
   memcached_return rc;
   unsigned int x;
-  protocol_binary_request_version request= {0};
+  protocol_binary_request_version request= { .bytes= {0}};
   request.message.header.request.magic= PROTOCOL_BINARY_REQ;
   request.message.header.request.opcode= PROTOCOL_BINARY_CMD_VERSION;
   request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;