Browse Source

Fix Implicit Return Types (#3363)

Both native_slot_merge and native_slot_merge_by_array have no return
type declared. GCC implicitly uses int as return type in such cases,
however, these functions are actually void.
Richard Fussenegger 8 years ago
parent
commit
29ff49f534
1 changed files with 2 additions and 2 deletions
  1. 2 2
      php/ext/google/protobuf/storage.c

+ 2 - 2
php/ext/google/protobuf/storage.c

@@ -762,7 +762,7 @@ void layout_set(MessageLayout* layout, MessageHeader* header,
   }
 }
 
-static native_slot_merge(const upb_fielddef* field, const void* from_memory,
+static void native_slot_merge(const upb_fielddef* field, const void* from_memory,
                          void* to_memory PHP_PROTO_TSRMLS_DC) {
   upb_fieldtype_t type = upb_fielddef_type(field);
   zend_class_entry* ce = NULL;
@@ -819,7 +819,7 @@ static native_slot_merge(const upb_fielddef* field, const void* from_memory,
   }
 }
 
-static native_slot_merge_by_array(const upb_fielddef* field, const void* from_memory,
+static void native_slot_merge_by_array(const upb_fielddef* field, const void* from_memory,
                          void* to_memory PHP_PROTO_TSRMLS_DC) {
   upb_fieldtype_t type = upb_fielddef_type(field);
   switch (type) {