[Bf-blender-cvs] [bd4b29d63de] master: Cleanup: fixed compiler warning about `strncat`

Sybren A. Stüvel noreply at git.blender.org
Mon Jul 27 17:03:52 CEST 2020


Commit: bd4b29d63de6cccdb524e965b28b8cf68e169cef
Author: Sybren A. Stüvel
Date:   Mon Jul 27 17:03:32 2020 +0200
Branches: master
https://developer.blender.org/rBbd4b29d63de6cccdb524e965b28b8cf68e169cef

Cleanup: fixed compiler warning about `strncat`

`strncat(command, "x", 1)` is the same as `strcat(command, "x")`, except
that the latter form doesn't trigger a GCC warning.

No functional changes.

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

M	extern/cuew/src/cuew.c

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

diff --git a/extern/cuew/src/cuew.c b/extern/cuew/src/cuew.c
index f477ec48a18..7a1b0018a24 100644
--- a/extern/cuew/src/cuew.c
+++ b/extern/cuew/src/cuew.c
@@ -879,7 +879,7 @@ int cuewCompilerVersion(void) {
   }
 
   /* get --version output */
-  strncat(command, "\"", 1);
+  strcat(command, "\"");
   strncat(command, path, sizeof(command) - 1);
   strncat(command, "\" --version", sizeof(command) - strlen(path) - 1);
   pipe = popen(command, "r");



More information about the Bf-blender-cvs mailing list