Blob Blame History Raw
From f8bdd437a0ab09315bfcb980ea590d4463f15189 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Tue, 7 Oct 2014 15:38:34 -0400
Subject: [PATCH 17/21] Ticket 47892 - Fix remaining compiler warnings

Description:  Fix the remaining compiler warnings from ds/lib/base/system.cpp

https://fedorahosted.org/389/ticket/47892

Reviewed by: nhosoi(Thanks!)

(cherry picked from commit 5f3aaa2872d69c5900eaf52d7e9fc2f1bcea475e)
(cherry picked from commit 0f29b5e920088ab4d32f5afdc7dcb076a88c5eae)
---
 lib/base/system.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/base/system.cpp b/lib/base/system.cpp
index 287d5a8..c4cbfd0 100644
--- a/lib/base/system.cpp
+++ b/lib/base/system.cpp
@@ -201,7 +201,7 @@ NSAPI_PUBLIC void *system_realloc_perm(void *ptr, int size)
             return ptr;
         }
     } else {
-        ereport(LOG_WARN, "realloc: attempt to realloc to smaller size");
+        ereport(LOG_WARN, const_cast<char *>("realloc: attempt to realloc to smaller size"));
         return realloc(ptr, size);
     }
 
@@ -228,20 +228,20 @@ NSAPI_PUBLIC void system_free_perm(void *ptr)
         cptr += sizeof(int); 
         for (index=0; index<DEBUG_MARGIN; index++)
             if (cptr[index] != DEBUG_MARGIN_CHAR) {
-                ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
+                ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
                 break;
             }
 
         cptr += DEBUG_MARGIN + *length;
         for (index=0; index<DEBUG_MARGIN; index++)
             if (cptr[index] != DEBUG_MARGIN_CHAR) {
-                ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
+                ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
                 break;
             }
 
         memset(baseptr, DEBUG_FREE_CHAR, *length + 2*DEBUG_MARGIN+sizeof(int));
     } else {
-        ereport(LOG_CATASTROPHE, "free: freeing unallocated memory");
+        ereport(LOG_CATASTROPHE, const_cast<char *>("free: freeing unallocated memory"));
     }
     free(baseptr);
 #else
-- 
1.9.3