From b91bc4f037b5c3ce69fef2d6187690ce05ffea62 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 8 Jul 2012 06:00:27 +0000 Subject: use gcc attrubutes to warn on unused return values and arguments which shouldnt be NULL. also remove IDP_AppendArray's return value which wasnt the new item in the array (which is odd/misleading), but wasnt used anywhere either. --- source/blender/blenkernel/intern/idprop.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/idprop.c') diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 42c7869a365..cff6ab2f125 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -33,11 +33,13 @@ #include #include +#include "BLI_utildefines.h" +#include "BLI_string.h" +#include "BLI_listbase.h" + #include "BKE_idprop.h" #include "BKE_library.h" -#include "BLI_blenlib.h" - #include "MEM_guardedalloc.h" /* IDPropertyTemplate is a union in DNA_ID.h */ @@ -122,11 +124,10 @@ IDProperty *IDP_GetIndexArray(IDProperty *prop, int index) return GETPROP(prop, index); } -IDProperty *IDP_AppendArray(IDProperty *prop, IDProperty *item) +void IDP_AppendArray(IDProperty *prop, IDProperty *item) { IDP_ResizeIDPArray(prop, prop->len + 1); IDP_SetIndexArray(prop, prop->len - 1, item); - return item; } void IDP_ResizeIDPArray(IDProperty *prop, int newlen) -- cgit v1.2.3