Blame SOURCES/0017-Ticket-47892-Fix-remaining-compiler-warnings.patch

f92ce9
From f8bdd437a0ab09315bfcb980ea590d4463f15189 Mon Sep 17 00:00:00 2001
f92ce9
From: Mark Reynolds <mreynolds@redhat.com>
f92ce9
Date: Tue, 7 Oct 2014 15:38:34 -0400
f92ce9
Subject: [PATCH 17/21] Ticket 47892 - Fix remaining compiler warnings
f92ce9
f92ce9
Description:  Fix the remaining compiler warnings from ds/lib/base/system.cpp
f92ce9
f92ce9
https://fedorahosted.org/389/ticket/47892
f92ce9
f92ce9
Reviewed by: nhosoi(Thanks!)
f92ce9
f92ce9
(cherry picked from commit 5f3aaa2872d69c5900eaf52d7e9fc2f1bcea475e)
f92ce9
(cherry picked from commit 0f29b5e920088ab4d32f5afdc7dcb076a88c5eae)
f92ce9
---
f92ce9
 lib/base/system.cpp | 8 ++++----
f92ce9
 1 file changed, 4 insertions(+), 4 deletions(-)
f92ce9
f92ce9
diff --git a/lib/base/system.cpp b/lib/base/system.cpp
f92ce9
index 287d5a8..c4cbfd0 100644
f92ce9
--- a/lib/base/system.cpp
f92ce9
+++ b/lib/base/system.cpp
f92ce9
@@ -201,7 +201,7 @@ NSAPI_PUBLIC void *system_realloc_perm(void *ptr, int size)
f92ce9
             return ptr;
f92ce9
         }
f92ce9
     } else {
f92ce9
-        ereport(LOG_WARN, "realloc: attempt to realloc to smaller size");
f92ce9
+        ereport(LOG_WARN, const_cast<char *>("realloc: attempt to realloc to smaller size"));
f92ce9
         return realloc(ptr, size);
f92ce9
     }
f92ce9
 
f92ce9
@@ -228,20 +228,20 @@ NSAPI_PUBLIC void system_free_perm(void *ptr)
f92ce9
         cptr += sizeof(int); 
f92ce9
         for (index=0; index
f92ce9
             if (cptr[index] != DEBUG_MARGIN_CHAR) {
f92ce9
-                ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
f92ce9
+                ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
f92ce9
                 break;
f92ce9
             }
f92ce9
 
f92ce9
         cptr += DEBUG_MARGIN + *length;
f92ce9
         for (index=0; index
f92ce9
             if (cptr[index] != DEBUG_MARGIN_CHAR) {
f92ce9
-                ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
f92ce9
+                ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
f92ce9
                 break;
f92ce9
             }
f92ce9
 
f92ce9
         memset(baseptr, DEBUG_FREE_CHAR, *length + 2*DEBUG_MARGIN+sizeof(int));
f92ce9
     } else {
f92ce9
-        ereport(LOG_CATASTROPHE, "free: freeing unallocated memory");
f92ce9
+        ereport(LOG_CATASTROPHE, const_cast<char *>("free: freeing unallocated memory"));
f92ce9
     }
f92ce9
     free(baseptr);
f92ce9
 #else
f92ce9
-- 
f92ce9
1.9.3
f92ce9