summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 03:28:13 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 03:28:13 +0000
commit27716194ce63a567507919de9c63a77d24386423 (patch)
treee654d6fa35624e8a53b1842626a912aed2608f70
parent18e5e898d778c2d7f11a26f378cd076e3c96e714 (diff)
INTEGRATION: CWS warnings01 (1.15.134); FILE MERGED
2005/11/18 09:13:24 sb 1.15.134.6: #i53898# Made code warning-free (in some cases reverting previous attempts). 2005/11/08 16:18:39 pl 1.15.134.5: #i53898# initializer warning on solaris 2005/11/07 12:11:29 sb 1.15.134.4: #i53898# Made code warning-free (additional -W switches for GCC). 2005/09/23 01:27:28 sb 1.15.134.3: RESYNC: (1.15-1.16); FILE MERGED 2005/09/20 12:57:21 sb 1.15.134.2: #i53898# Globally disable problematic warnings. 2005/08/29 13:56:03 sb 1.15.134.1: #i53898# Made code warning-free.
-rw-r--r--sal/rtl/source/alloc.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/sal/rtl/source/alloc.c b/sal/rtl/source/alloc.c
index e218c244cd57..f08eb2bcfe16 100644
--- a/sal/rtl/source/alloc.c
+++ b/sal/rtl/source/alloc.c
@@ -4,9 +4,9 @@
*
* $RCSfile: alloc.c,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 15:59:58 $
+ * last change: $Author: hr $ $Date: 2006-06-20 04:28:13 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -65,6 +65,8 @@
#define INCLUDED_STRING_H
#endif
+#ifndef FORCE_SYSALLOC
+
/*===========================================================================
*
* rtl_memory (UNX) internals.
@@ -150,7 +152,9 @@ static void* __rtl_memory_vmalloc (sal_Size n)
#ifdef SAL_W32
#define WIN32_LEAN_AND_MEAN
+#pragma warning(push,1) /* disable warnings within system headers */
#include <windows.h>
+#include <wchar.h>
typedef CRITICAL_SECTION mutex_type;
@@ -259,7 +263,11 @@ struct __rtl_memory_global_st
static struct __rtl_memory_global_st g_memory =
{
- 0, 0, { RTL_MUTEX_INITIALIZER }
+ 0, 0, { RTL_MUTEX_INITIALIZER },
+ { 0, 0, NULL, NULL }, { 0, 0, NULL, NULL }, { { 0, 0, NULL, NULL } },
+#if OSL_DEBUG_LEVEL > 0
+ { { 0, 0, 0, 0, 0, 0 } }
+#endif /* OSL_DEBUG_LEVEL */
};
void SAL_CALL ___rtl_memory_init (void);
@@ -536,6 +544,7 @@ static int __dbg_memory_verify (memory_type * x, int debug)
return (1);
}
+#if OSL_DEBUG_LEVEL > 1
/*
* __dbg_memory_usage_update.
*/
@@ -606,6 +615,7 @@ static void __dbg_memory_usage (memory_stat * total)
}
}
}
+#endif /* OSL_DEBUG_LEVEL */
#endif /* OSL_DEBUG_LEVEL */
#if OSL_DEBUG_LEVEL > 0
@@ -1131,6 +1141,8 @@ static void __rtl_memory_enqueue (memory_type **ppMemory)
#define RTL_MEMORY_ENQUEUE(m) __rtl_memory_enqueue((m))
+#endif /* FORCE_SYSALLOC */
+
/*===========================================================================
*
* rtl_memory (manager) implementation.
@@ -1408,6 +1420,7 @@ void* SAL_CALL rtl_allocateZeroMemory (sal_Size n) SAL_THROW_EXTERN_C()
#ifndef FORCE_SYSALLOC
void SAL_CALL rtl_freeZeroMemory (void * p, sal_Size n) SAL_THROW_EXTERN_C()
{
+ (void) n; /* unused */
if (p)
{
memory_type * memory = queue_cast(p, -(__C__));