[Bf-blender-cvs] [36ae49502bb] master: blenlib: Fix build warning with MSVC

Ray Molenkamp noreply at git.blender.org
Sat May 25 21:22:28 CEST 2019


Commit: 36ae49502bbec312095dcf5a8df9c2b2201b9466
Author: Ray Molenkamp
Date:   Sat May 25 13:22:25 2019 -0600
Branches: master
https://developer.blender.org/rB36ae49502bbec312095dcf5a8df9c2b2201b9466

blenlib: Fix build warning with MSVC

The declaration and implementation of BLI_path_name_at_index were
out of sync leading to build warning

C4028: formal parameter 1/3/4 different from declaration

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

M	source/blender/blenlib/intern/path_util.c

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

diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 3bb60a20fc8..61b773f6016 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1855,7 +1855,10 @@ const char *BLI_path_basename(const char *path)
  *
  * Ignores multiple slashes at any point in the path (including start/end).
  */
-bool BLI_path_name_at_index(const char *path, const int index, int *r_offset, int *r_len)
+bool BLI_path_name_at_index(const char *__restrict path,
+                            const int index,
+                            int *__restrict r_offset,
+                            int *__restrict r_len)
 {
   if (index >= 0) {
     int index_step = 0;



More information about the Bf-blender-cvs mailing list