fix format string warnings
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7162 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: f27de7f880a9d26ed339466737e08eaba21e7b25 Former-commit-id: 98cfbb5946190c4e6c07771acfdbd02c246f4c7c
This commit is contained in:
parent
8daefe9fa2
commit
6282705114
1 changed files with 12 additions and 0 deletions
|
@ -2575,7 +2575,11 @@ GfParmListRemoveElt (void *handle, const char *path, const char *key)
|
|||
}
|
||||
fullName = (char *) malloc (strlen (path) + strlen (key) + 2);
|
||||
if (!fullName) {
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
GfLogError ("GfParmListRemoveElt: malloc (%lu) failed\n", strlen (path) + strlen (key) + 2);
|
||||
#else
|
||||
GfLogError ("GfParmListRemoveElt: malloc (%zu) failed\n", strlen (path) + strlen (key) + 2);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
sprintf (fullName, "%s/%s", path, key);
|
||||
|
@ -2619,7 +2623,11 @@ GfParmListRenameElt (void *handle, const char *path, const char *oldKey, const c
|
|||
// Build new element full name.
|
||||
newFullName = (char *) malloc (strlen (path) + strlen (newKey) + 2);
|
||||
if (!newFullName) {
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
GfLogError ("GfParmListRenameElt: malloc (%lu) failed\n", strlen (path) + strlen (newKey) + 2);
|
||||
#else
|
||||
GfLogError ("GfParmListRenameElt: malloc (%zu) failed\n", strlen (path) + strlen (newKey) + 2);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
sprintf (newFullName, "%s/%s", path, newKey);
|
||||
|
@ -2634,7 +2642,11 @@ GfParmListRenameElt (void *handle, const char *path, const char *oldKey, const c
|
|||
// Check if no other element has same fullname in the list.
|
||||
oldFullName = (char *) malloc (strlen (path) + strlen (oldKey) + 2);
|
||||
if (!oldFullName) {
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
GfLogError ("GfParmListRenameElt: malloc (%lu) failed", strlen (path) + strlen (oldKey) + 2);
|
||||
#else
|
||||
GfLogError ("GfParmListRenameElt: malloc (%zu) failed", strlen (path) + strlen (oldKey) + 2);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
sprintf (oldFullName, "%s/%s", path, oldKey);
|
||||
|
|
Loading…
Reference in a new issue