From fbbda4c06e6ae642e5702bb39aff92a0ea007a75 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 17 Sep 2009 14:46:22 +0000 Subject: Warning fixes for blenkernel and editors. Note sure what to do with this one, and personally think we should avoid using macros for this kind of thing: V_GROW(edges); source/blender/editors/mesh/loopcut.c:232: warning: value computed is not used --- source/blender/blenkernel/intern/text.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/text.c') diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 350b0acba9d..270cd873ff5 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -596,17 +596,15 @@ static TextLine *txt_new_line(char *str) return tmp; } -static TextLine *txt_new_linen(char *str, int n) +static TextLine *txt_new_linen(const char *str, int n) { TextLine *tmp; - if(!str) str= ""; - tmp= (TextLine *) MEM_mallocN(sizeof(TextLine), "textline"); tmp->line= MEM_mallocN(n+1, "textline_string"); tmp->format= NULL; - BLI_strncpy(tmp->line, str, n+1); + BLI_strncpy(tmp->line, (str)? str: "", n+1); tmp->len= strlen(tmp->line); tmp->next= tmp->prev= NULL; -- cgit v1.2.3