diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-04 14:44:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-04 14:44:56 +0300 |
commit | 0271ad6322775de43f0c3f790f070b975861aa7d (patch) | |
tree | 4c2cc979df62437344d13efa69e50c13ca948d8f /source/blender/makesrna/intern | |
parent | 471d304df1492e95c611b2d5666d7befeac27272 (diff) |
Give functions that use printf style formatting GCC format attributes so if incorrect formatting is used the compiler will warn of this.
found & fixed 2x incorrect formatting args.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 4 |
7 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index bc803415c7c..63a2c5d41d4 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -224,7 +224,7 @@ StructRNA *rna_IDPropertyGroup_register(const bContext *C, ReportList *reports, * owns the string pointer which it could potentually free while blender * is running. */ if(strlen(identifier) >= sizeof(((IDProperty *)NULL)->name)) { - BKE_reportf(reports, RPT_ERROR, "registering id property class: '%s' is too long, maximum length is %d.", identifier, sizeof(((IDProperty *)NULL)->name)); + BKE_reportf(reports, RPT_ERROR, "registering id property class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(((IDProperty *)NULL)->name)); return NULL; } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 9ec21b13695..77ff78fc9bf 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3771,7 +3771,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop) BLI_dynstr_appendf(dynstr, "'%s'", identifier); } else { - BLI_dynstr_appendf(dynstr, "'<UNKNOWN ENUM>'", identifier); + BLI_dynstr_append(dynstr, "'<UNKNOWN ENUM>'"); } break; } diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 85f070b3162..203f84118d8 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -173,7 +173,7 @@ static StructRNA *rna_KeyingSetInfo_register(const bContext *C, ReportList *repo return NULL; if (strlen(identifier) >= sizeof(dummyksi.idname)) { - BKE_reportf(reports, RPT_ERROR, "registering keying set info class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummyksi.idname)); + BKE_reportf(reports, RPT_ERROR, "registering keying set info class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyksi.idname)); return NULL; } diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 7b49edb9158..dd989d05441 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -962,17 +962,17 @@ static char *rna_VertexGroupElement_path(PointerRNA *ptr) static char *rna_MeshFace_path(PointerRNA *ptr) { - return BLI_sprintfN("faces[%d]", (MFace*)ptr->data - ((Mesh*)ptr->id.data)->mface); + return BLI_sprintfN("faces[%d]", (int)((MFace*)ptr->data - ((Mesh*)ptr->id.data)->mface)); } static char *rna_MeshEdge_path(PointerRNA *ptr) { - return BLI_sprintfN("edges[%d]", (MEdge*)ptr->data - ((Mesh*)ptr->id.data)->medge); + return BLI_sprintfN("edges[%d]", (int)((MEdge*)ptr->data - ((Mesh*)ptr->id.data)->medge)); } static char *rna_MeshVertex_path(PointerRNA *ptr) { - return BLI_sprintfN("vertices[%d]", (MVert*)ptr->data - ((Mesh*)ptr->id.data)->mvert); + return BLI_sprintfN("vertices[%d]", (int)((MVert*)ptr->data - ((Mesh*)ptr->id.data)->mvert)); } static char *rna_MeshTextureFaceLayer_path(PointerRNA *ptr) @@ -1015,7 +1015,7 @@ static char *rna_MeshColor_path(PointerRNA *ptr) static char *rna_MeshSticky_path(PointerRNA *ptr) { - return BLI_sprintfN("sticky[%d]", (MSticky*)ptr->data - ((Mesh*)ptr->id.data)->msticky); + return BLI_sprintfN("sticky[%d]", (int)((MSticky*)ptr->data - ((Mesh*)ptr->id.data)->msticky)); } static char *rna_MeshIntPropertyLayer_path(PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index ae965b237cd..800947ac881 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -124,7 +124,7 @@ static StructRNA *rna_RenderEngine_register(const bContext *C, ReportList *repor return NULL; if(strlen(identifier) >= sizeof(dummyet.idname)) { - BKE_reportf(reports, RPT_ERROR, "registering render engine class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummyet.idname)); + BKE_reportf(reports, RPT_ERROR, "registering render engine class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyet.idname)); return NULL; } diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index f2c33f354c2..1275c435158 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -180,7 +180,7 @@ static StructRNA *rna_Panel_register(const bContext *C, ReportList *reports, voi return NULL; if(strlen(identifier) >= sizeof(dummypt.idname)) { - BKE_reportf(reports, RPT_ERROR, "registering panel class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummypt.idname)); + BKE_reportf(reports, RPT_ERROR, "registering panel class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummypt.idname)); return NULL; } @@ -283,7 +283,7 @@ static StructRNA *rna_Header_register(const bContext *C, ReportList *reports, vo return NULL; if(strlen(identifier) >= sizeof(dummyht.idname)) { - BKE_reportf(reports, RPT_ERROR, "registering header class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummyht.idname)); + BKE_reportf(reports, RPT_ERROR, "registering header class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyht.idname)); return NULL; } @@ -401,7 +401,7 @@ static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void return NULL; if(strlen(identifier) >= sizeof(dummymt.idname)) { - BKE_reportf(reports, RPT_ERROR, "registering menu class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummymt.idname)); + BKE_reportf(reports, RPT_ERROR, "registering menu class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummymt.idname)); return NULL; } diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 86ad964247f..bf00f625f42 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -854,7 +854,7 @@ static StructRNA *rna_Operator_register(const bContext *C, ReportList *reports, } if(strlen(identifier) >= sizeof(dummyop.idname)) { - BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummyop.idname)); + BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyop.idname)); return NULL; } @@ -924,7 +924,7 @@ static StructRNA *rna_MacroOperator_register(const bContext *C, ReportList *repo } if(strlen(identifier) >= sizeof(dummyop.idname)) { - BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummyop.idname)); + BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyop.idname)); return NULL; } |