Skip to content
Snippets Groups Projects
Commit 054031f8 authored by rswindell's avatar rswindell
Browse files

Resolve msvc10 warnings:

warning C4244: '=' : conversion from 'const jschar' to 'char', possible loss of data
Only include JS headers when building a module that needs them
(i.e. JAVASCRIPT is defined).
parent dcd32b43
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,9 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
#define XP_PC
#define XP_WIN
#endif
#if defined(JAVASCRIPT)
#include "comio.h" /* needed for COM_HANDLE definition only */
#include <jsversion.h>
#include <jsapi.h>
#define JS_DestroyScript(cx,script)
......@@ -122,7 +125,7 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
if((JSSTSstrval=JS_GetStringCharsAndLength((cx), (str), JSSTSlenptr))) { \
if(((ret)=(char *)alloca(*JSSTSlenptr+1))) { \
for(JSSTSpos=0; JSSTSpos<*JSSTSlenptr; JSSTSpos++) \
(ret)[JSSTSpos]=JSSTSstrval[JSSTSpos]; \
(ret)[JSSTSpos]=(char)JSSTSstrval[JSSTSpos]; \
(ret)[*JSSTSlenptr]=0; \
} \
} \
......@@ -135,6 +138,8 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
JSSTRING_TO_STRING((cx), JSVTSstr, (ret), lenptr); \
}
#endif
#ifdef USE_CRYPTLIB
#include <cryptlib.h>
#endif
......@@ -163,7 +168,6 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
#include "threadwrap.h" /* pthread_mutex_t */
#endif
#include "comio.h"
#include "smblib.h"
#include "ars_defs.h"
#include "scfgdefs.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment