scilab: remove compilation warnings

This commit is contained in:
Simon Marchetto 2016-09-26 13:55:45 +02:00
commit 457ea5d209
3 changed files with 3 additions and 4 deletions

View file

@ -125,7 +125,6 @@ SWIG_SciBoolean_AsIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, int *iCo
} }
if (isBooleanType(pvApiCtx, piAddrVar)) { if (isBooleanType(pvApiCtx, piAddrVar)) {
int i;
sciErr = getMatrixOfBoolean(pvApiCtx, piAddrVar, iRows, iCols, piValue); sciErr = getMatrixOfBoolean(pvApiCtx, piAddrVar, iRows, iCols, piValue);
if (sciErr.iErr) { if (sciErr.iErr) {
printError(&sciErr, 0); printError(&sciErr, 0);

View file

@ -84,7 +84,7 @@ SWIG_FromSet_Sequence_dec(bool)(int size, int *pSequence) {
SWIGINTERN bool SWIGINTERN bool
SWIG_AsVal_SequenceItem_dec(bool)(SwigSciObject obj, int *pSequence, int iItemIndex) { SWIG_AsVal_SequenceItem_dec(bool)(SwigSciObject obj, int *pSequence, int iItemIndex) {
return pSequence[iItemIndex]; return (bool) pSequence[iItemIndex];
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
*char *
* Scilab matrix of string <-> C++ std::string container * Scilab matrix of string <-> C++ std::string container
* *
*/ */
@ -88,7 +88,7 @@ SWIG_AsVal_SequenceItem_dec(std::string)(SwigSciObject obj, char **pSequence, in
SWIGINTERN int SWIGINTERN int
SWIG_From_SequenceItem_dec(std::string)(char **pSequence, int iItemIndex, std::string itemValue) { SWIG_From_SequenceItem_dec(std::string)(char **pSequence, int iItemIndex, std::string itemValue) {
char *pChar = new char(itemValue.size() + 1); char *pChar = new char((int) itemValue.size() + 1);
strcpy(pChar, itemValue.c_str()); strcpy(pChar, itemValue.c_str());
pSequence[iItemIndex] = pChar; pSequence[iItemIndex] = pChar;
return SWIG_OK; return SWIG_OK;