Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-08 10:00:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-08 10:00:27 +0400
commitb91bc4f037b5c3ce69fef2d6187690ce05ffea62 (patch)
tree1743b926b26e6b06007744a002b4ce3014ad526d /source/blender/blenkernel/BKE_library.h
parent8ce864784cc6aa5b0a5d27a5f3ef3da1240fab62 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/BKE_library.h')
-rw-r--r--source/blender/blenkernel/BKE_library.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 3248944dae8..91756448297 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -45,8 +45,18 @@ struct bContext;
struct PointerRNA;
struct PropertyRNA;
-void *BKE_libblock_alloc(struct ListBase *lb, short type, const char *name);
-void *BKE_libblock_copy(struct ID *id);
+void *BKE_libblock_alloc(struct ListBase *lb, short type, const char *name)
+#ifdef __GNUC__
+__attribute__((warn_unused_result))
+__attribute__((nonnull))
+#endif
+;
+void *BKE_libblock_copy(struct ID *id)
+#ifdef __GNUC__
+__attribute__((warn_unused_result))
+__attribute__((nonnull))
+#endif
+;
void BKE_libblock_copy_data(struct ID *id, const struct ID *id_from, const short do_action);
void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id);
@@ -82,7 +92,12 @@ void name_uiprefix_id(char *name, struct ID *id);
void test_idbutton(char *name);
void text_idbutton(struct ID *id, char *text);
void BKE_library_make_local(struct Main *bmain, struct Library *lib, int untagged_only);
-struct ID *BKE_libblock_find_name(const short type, const char *name);
+struct ID *BKE_libblock_find_name(const short type, const char *name)
+#ifdef __GNUC__
+__attribute__((warn_unused_result))
+__attribute__((nonnull))
+#endif
+;
void clear_id_newpoins(void);
void IDnames_to_pupstring(const char **str, const char *title, const char *extraops,