mirror of
https://github.com/samba-team/samba.git
synced 2025-11-20 08:23:50 +03:00
r17334: Some C++ warnings
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
be9aaffdac
commit
8ae7ed1f3c
@@ -236,7 +236,7 @@ static char *debug_list_class_names_and_levels(void)
|
||||
}
|
||||
|
||||
/* create single string list - add space for newline */
|
||||
b = buf = SMB_MALLOC(dim+1);
|
||||
b = buf = (char *)SMB_MALLOC(dim+1);
|
||||
if (!buf) {
|
||||
err = True;
|
||||
goto done;
|
||||
@@ -320,7 +320,7 @@ int debug_add_class(const char *classname)
|
||||
new_ptr = SMB_REALLOC_ARRAY(new_ptr, int, debug_num_classes + 1);
|
||||
if (!new_ptr)
|
||||
return -1;
|
||||
DEBUGLEVEL_CLASS = new_ptr;
|
||||
DEBUGLEVEL_CLASS = (int *)new_ptr;
|
||||
DEBUGLEVEL_CLASS[ndx] = 0;
|
||||
|
||||
/* debug_level is the pointer used for the DEBUGLEVEL-thingy */
|
||||
@@ -337,13 +337,13 @@ int debug_add_class(const char *classname)
|
||||
new_ptr = SMB_REALLOC_ARRAY(new_ptr, BOOL, debug_num_classes + 1);
|
||||
if (!new_ptr)
|
||||
return -1;
|
||||
DEBUGLEVEL_CLASS_ISSET = new_ptr;
|
||||
DEBUGLEVEL_CLASS_ISSET = (int *)new_ptr;
|
||||
DEBUGLEVEL_CLASS_ISSET[ndx] = False;
|
||||
|
||||
new_ptr = SMB_REALLOC_ARRAY(classname_table, char *, debug_num_classes + 1);
|
||||
if (!new_ptr)
|
||||
return -1;
|
||||
classname_table = new_ptr;
|
||||
classname_table = (char **)new_ptr;
|
||||
|
||||
classname_table[ndx] = SMB_STRDUP(classname);
|
||||
if (! classname_table[ndx])
|
||||
@@ -474,7 +474,7 @@ BOOL debug_parse_levels(const char *params_str)
|
||||
static void debug_message(int msg_type, struct process_id src,
|
||||
void *buf, size_t len)
|
||||
{
|
||||
const char *params_str = buf;
|
||||
const char *params_str = (const char *)buf;
|
||||
|
||||
/* Check, it's a proper string! */
|
||||
if (params_str[len-1] != '\0') {
|
||||
|
||||
Reference in New Issue
Block a user