Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2012-11-23 19:12:13 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2012-11-23 19:12:13 +0400
commit69b88cf719c7aa9e28e28063557c8fe6f4963327 (patch)
treee04c1141b92cee50f6f28ae89e16b0d8e3176d42 /source/blender/blenlib/intern/string.c
parentc407c951a09c55f6ba64a8b372a24678cc919b5f (diff)
Patch [#33196] Warning Fixes 11-16-2012
* MEM_CacheLimitier - Size type to int conversion, should be safe for now (doing my best Bill Gates 640k impression) * OpenNL CMakeLists.txt - MSVC and GCC have slightly different ways to remove definitions (DEBUG) without the compiler complaining * BLI_math inlines - The include guard name and inline option macro name should be different. Suppressed warning about not exporting any symbols from inline math library * BLI string / utf8 - Fixed some inconsistencies between declarations and definitions * nodes - node_composite_util is apparently not used unless you enable the legacy compositor, so it should not be compiled in that case. Leaving out changes to BLI_fileops for now, need to do more testing.
Diffstat (limited to 'source/blender/blenlib/intern/string.c')
-rw-r--r--source/blender/blenlib/intern/string.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index ff589764287..14e0dc2f049 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -56,7 +56,7 @@ char *BLI_strdup(const char *str)
return BLI_strdupn(str, strlen(str));
}
-char *BLI_strdupcat(const char *str1, const char *str2)
+char *BLI_strdupcat(const char *__restrict str1, const char *__restrict str2)
{
size_t len;
char *n;
@@ -69,7 +69,7 @@ char *BLI_strdupcat(const char *str1, const char *str2)
return n;
}
-char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy)
+char *BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy)
{
size_t srclen = strlen(src);
size_t cpylen = (srclen > (maxncpy - 1)) ? (maxncpy - 1) : srclen;
@@ -81,7 +81,7 @@ char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy)
return dst;
}
-size_t BLI_vsnprintf(char *buffer, size_t count, const char *format, va_list arg)
+size_t BLI_vsnprintf(char *__restrict buffer, size_t count, const char *__restrict format, va_list arg)
{
size_t n;
@@ -97,7 +97,7 @@ size_t BLI_vsnprintf(char *buffer, size_t count, const char *format, va_list arg
return n;
}
-size_t BLI_snprintf(char *buffer, size_t count, const char *format, ...)
+size_t BLI_snprintf(char *__restrict buffer, size_t count, const char *__restrict format, ...)
{
size_t n;
va_list arg;
@@ -109,7 +109,7 @@ size_t BLI_snprintf(char *buffer, size_t count, const char *format, ...)
return n;
}
-char *BLI_sprintfN(const char *format, ...)
+char *BLI_sprintfN(const char *__restrict format, ...)
{
DynStr *ds;
va_list arg;
@@ -133,7 +133,7 @@ char *BLI_sprintfN(const char *format, ...)
* TODO: support more fancy string escaping. current code is primitive
* this basically is an ascii version of PyUnicode_EncodeUnicodeEscape()
* which is a useful reference. */
-size_t BLI_strescape(char *dst, const char *src, const size_t maxncpy)
+size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const size_t maxncpy)
{
size_t len = 0;
@@ -186,7 +186,7 @@ escape_finish:
*
* TODO, return the offset and a length so as to avoid doing an allocation.
*/
-char *BLI_str_quoted_substrN(const char *str, const char *prefix)
+char *BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict prefix)
{
size_t prefixLen = strlen(prefix);
char *startMatch, *endMatch;
@@ -207,7 +207,7 @@ char *BLI_str_quoted_substrN(const char *str, const char *prefix)
/* A rather wasteful string-replacement utility, though this shall do for now...
* Feel free to replace this with an even safe + nicer alternative */
-char *BLI_replacestr(char *str, const char *oldText, const char *newText)
+char *BLI_replacestr(char *__restrict str, const char *__restrict oldText, const char *__restrict newText)
{
DynStr *ds = NULL;
size_t lenOld = strlen(oldText);