lib/base/system.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 5f3aaa2872d69c5900eaf52d7e9fc2f1bcea475e
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Oct 7 15:38:34 2014 -0400
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!)
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