From 6282705114c8b15e10e18f2e3b86714788a7e889 Mon Sep 17 00:00:00 2001 From: iobyte Date: Fri, 31 Jul 2020 20:50:12 +0000 Subject: [PATCH] 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 --- src/libs/tgf/params.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libs/tgf/params.cpp b/src/libs/tgf/params.cpp index fe8d0d4e..33d1b71c 100644 --- a/src/libs/tgf/params.cpp +++ b/src/libs/tgf/params.cpp @@ -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);