summaryrefslogtreecommitdiff
path: root/source3/lib/util_unistr.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-30 16:36:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:25 -0500
commite23781b3b304d1e69ad80af5ae9c0ed8d02cf996 (patch)
treed3a6eb0774d9ce907152e886c4c920d24ac2d715 /source3/lib/util_unistr.c
parent5a5deade6e4634aad561139f39337c9a960c0b80 (diff)
downloadsamba-e23781b3b304d1e69ad80af5ae9c0ed8d02cf996.tar.gz
samba-e23781b3b304d1e69ad80af5ae9c0ed8d02cf996.tar.bz2
samba-e23781b3b304d1e69ad80af5ae9c0ed8d02cf996.zip
r17316: More C++ warnings -- 456 left
(This used to be commit 1e4ee728df7eeafc1b4d533240acb032f73b4f5c)
Diffstat (limited to 'source3/lib/util_unistr.c')
-rw-r--r--source3/lib/util_unistr.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index a0015c265f..31114feb92 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -88,10 +88,12 @@ void load_case_tables(void)
}
initialised = 1;
- upcase_table = map_file(lib_path("upcase.dat"), 0x20000);
+ upcase_table = (smb_ucs2_t *)map_file(lib_path("upcase.dat"),
+ 0x20000);
upcase_table_use_unmap = ( upcase_table != NULL );
- lowcase_table = map_file(lib_path("lowcase.dat"), 0x20000);
+ lowcase_table = (smb_ucs2_t *)map_file(lib_path("lowcase.dat"),
+ 0x20000);
lowcase_table_use_unmap = ( lowcase_table != NULL );
#ifdef HAVE_SETLOCALE
@@ -111,7 +113,7 @@ void load_case_tables(void)
not available */
if (!upcase_table) {
DEBUG(1,("creating lame upcase table\n"));
- upcase_table = SMB_MALLOC(0x20000);
+ upcase_table = (smb_ucs2_t *)SMB_MALLOC(0x20000);
for (i=0;i<0x10000;i++) {
smb_ucs2_t v;
SSVAL(&v, 0, i);
@@ -126,7 +128,7 @@ void load_case_tables(void)
if (!lowcase_table) {
DEBUG(1,("creating lame lowcase table\n"));
- lowcase_table = SMB_MALLOC(0x20000);
+ lowcase_table = (smb_ucs2_t *)SMB_MALLOC(0x20000);
for (i=0;i<0x10000;i++) {
smb_ucs2_t v;
SSVAL(&v, 0, i);
@@ -228,7 +230,7 @@ void init_valid_table(void)
return;
}
- valid_file = map_file(lib_path("valid.dat"), 0x10000);
+ valid_file = (uint8 *)map_file(lib_path("valid.dat"), 0x10000);
if (valid_file) {
valid_table = valid_file;
mapped_file = 1;
@@ -247,7 +249,7 @@ void init_valid_table(void)
valid_table_use_unmap = False;
DEBUG(2,("creating default valid table\n"));
- valid_table = SMB_MALLOC(0x10000);
+ valid_table = (uint8 *)SMB_MALLOC(0x10000);
for (i=0;i<128;i++) {
valid_table[i] = isalnum(i) || strchr(allowed,i);
}