[Bf-blender-cvs] [31d2b04411b] temp_bmesh_multires: Sculpt dyntopo: Who knew gcc's nonnull attribute is 1-based

Joseph Eagar noreply at git.blender.org
Fri Aug 27 11:01:26 CEST 2021


Commit: 31d2b04411bced1f163e1dbdd893960afeba0a20
Author: Joseph Eagar
Date:   Thu Aug 26 20:23:17 2021 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rB31d2b04411bced1f163e1dbdd893960afeba0a20

Sculpt dyntopo: Who knew gcc's nonnull attribute is 1-based

===================================================================

M	source/blender/blenlib/BLI_compiler_attrs.h
M	source/blender/bmesh/intern/bmesh_mesh_convert.h

===================================================================

diff --git a/source/blender/blenlib/BLI_compiler_attrs.h b/source/blender/blenlib/BLI_compiler_attrs.h
index bf31e35cd50..65f4873f0fd 100644
--- a/source/blender/blenlib/BLI_compiler_attrs.h
+++ b/source/blender/blenlib/BLI_compiler_attrs.h
@@ -33,6 +33,12 @@
 /* hint to mark function arguments expected to be non-null
  * if no arguments are given to the macro, all of pointer
  * arguments would be expected to be non-null
+ *
+ * ONE-INDEXED!
+ *
+ * Example:
+ *
+ * void func(void *a, void *b, void *b) ATTR_NONNULL(1, 2, 3)
  */
 #ifdef __GNUC__
 #  define ATTR_NONNULL(args...) __attribute__((nonnull(args)))
diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.h b/source/blender/bmesh/intern/bmesh_mesh_convert.h
index 3e000200c7d..26debf37ac3 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_convert.h
+++ b/source/blender/bmesh/intern/bmesh_mesh_convert.h
@@ -50,7 +50,7 @@ struct Object;
 void BM_mesh_bm_from_me(struct Object *ob,
                         BMesh *bm,
                         const struct Mesh *me,
-                        const struct BMeshFromMeshParams *params) ATTR_NONNULL(1, 3);
+                        const struct BMeshFromMeshParams *params) ATTR_NONNULL(2, 3);
 
 struct BMeshToMeshParams {
   /** Update object hook indices & vertex parents. */



More information about the Bf-blender-cvs mailing list