mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023934: Compiler warnings in MS VC++ 10
Elimination of compiler warnings - ExprIntrp: generated file ExprIntrp.tab.c and related WOK scripts removed from the sources - ExprIntrp, StepFile: added missing declarations and casts; warnings caused by Flex and Bison code suppressed for MSVC compuler by #pragma - OSD: dummy #includes added to files containing no code for Windows, to avoid warning on empty file - PLib: piece of code contained in PLib_ChangeDim.gxx included explicitly in cxx and cleaned - Other places: some casts added to avoid warnings
This commit is contained in:
@@ -549,4 +549,9 @@ write_mailbox(int *boxid, char *box_name, char *message, int length)
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
// to avoid compiler warning on empty file
|
||||
#include "string.h"
|
||||
|
||||
#endif
|
||||
|
@@ -317,4 +317,9 @@ osd_alarm_(int sec,RETSIGTYPE (*_alarm)())
|
||||
|
||||
#endif /* __hpux */
|
||||
|
||||
#else
|
||||
|
||||
// to avoid compiler warning on empty file
|
||||
#include "string.h"
|
||||
|
||||
#endif /* WNT */
|
||||
|
@@ -119,4 +119,9 @@ int remove_sharedmemory(int *shmid, char *section_name)
|
||||
if (status < 0) return 0;
|
||||
else return 1;
|
||||
}
|
||||
#else
|
||||
|
||||
// to avoid compiler warning on empty file
|
||||
#include "string.h"
|
||||
|
||||
#endif
|
||||
|
@@ -85,9 +85,11 @@ OSD_MAllocHook::CollectBySize* OSD_MAllocHook::GetCollectBySize()
|
||||
|
||||
static long getRequestNum(void* pvData, long lRequest, size_t& theSize)
|
||||
{
|
||||
#if _MSC_VER == 1500 /* VS 2008 */
|
||||
#ifdef _DEBUG /* in Release, _CrtIsValidHeapPointer is always 1 */
|
||||
if (_CrtIsValidHeapPointer(pvData))
|
||||
#endif
|
||||
{
|
||||
#if _MSC_VER == 1500 // VS 2008
|
||||
#define nNoMansLandSize 4
|
||||
// the header struct is taken from crt/src/dbgint.h
|
||||
struct _CrtMemBlockHeader
|
||||
@@ -105,8 +107,10 @@ static long getRequestNum(void* pvData, long lRequest, size_t& theSize)
|
||||
_CrtMemBlockHeader* aHeader = ((_CrtMemBlockHeader*)pvData)-1;
|
||||
theSize = aHeader->nDataSize;
|
||||
return aHeader->lRequest;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
(void)pvData; (void)theSize; // avoid compiler warning on unused arg
|
||||
#endif
|
||||
return lRequest;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user