[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sal/osl
Pedro Giffuni
pfg at apache.org
Wed Oct 7 15:08:23 PDT 2015
sal/osl/unx/backtrace.h | 2 +-
sal/osl/unx/file.cxx | 2 +-
sal/osl/w32/profile.cxx | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 6c12a27867dc7df6196e74a0409c21072601bb79
Author: Pedro Giffuni <pfg at apache.org>
Date: Wed Oct 7 21:37:01 2015 +0000
Bring back the casts for Win32.
Our old version of MSVC doesn't understand CERT secure C coding standard
MEM 02-A.
Reported by: damjan (through pescetti)
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 3c7ef52..ba11b16 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -1584,7 +1584,7 @@ static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line)
if (pProfile->m_Lines == NULL)
{
pProfile->m_MaxLines = LINES_INI;
- pProfile->m_Lines = calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
+ pProfile->m_Lines = (sal_Char **)calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
}
else
{
@@ -1625,7 +1625,7 @@ static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Li
if (pProfile->m_Lines == NULL)
{
pProfile->m_MaxLines = LINES_INI;
- pProfile->m_Lines = calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
+ pProfile->m_Lines = (sal_Char **)calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
}
else
{
@@ -1799,7 +1799,7 @@ static sal_Bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char*
if (pProfile->m_Sections == NULL)
{
pProfile->m_MaxSections = SECTIONS_INI;
- pProfile->m_Sections = calloc(pProfile->m_MaxSections, sizeof(osl_TProfileSection));
+ pProfile->m_Sections = (osl_TProfileSection *)calloc(pProfile->m_MaxSections, sizeof(osl_TProfileSection));
}
else
{
commit d52c7f2946fe867b89057796a4b109c7ef95c73a
Author: Pedro Giffuni <pfg at apache.org>
Date: Wed Oct 7 20:30:12 2015 +0000
FreeBSD: Small cleanup and enhancement.
Reviewed by: Don Lewis
diff --git a/sal/osl/unx/backtrace.h b/sal/osl/unx/backtrace.h
index c836ee0..29bf3e0 100644
--- a/sal/osl/unx/backtrace.h
+++ b/sal/osl/unx/backtrace.h
@@ -22,7 +22,7 @@
-#if defined (SOLARIS) || (FREEBSD)
+#if defined (FREEBSD) || defined (SOLARIS)
#ifdef __cplusplus
extern "C" {
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index f7aff4c..31373b0 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -1085,7 +1085,7 @@ SAL_CALL osl_mapFile (
// OS simultaneously pages in the rest); on other platforms, it remains
// to be evaluated whether madvise or equivalent is available and
// actually useful:
-#if defined MACOSX
+#if defined (FREEBSD) || defined (MACOSX)
int e = posix_madvise(p, nLength, POSIX_MADV_WILLNEED);
if (e != 0)
{
More information about the Libreoffice-commits
mailing list