diff --git a/CMakeLists.txt b/CMakeLists.txt index bc211c71a4..b323237505 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -327,7 +327,6 @@ add_compile_options( -Wno-deprecated-declarations -Wno-pointer-to-int-cast -Wno-compare-distinct-pointer-types - -Wno-conditional-type-mismatch -Wno-unused-local-typedef -Wno-unknown-warning-option ) diff --git a/extracted/plugins/FilePlugin/include/common/FilePlugin.h b/extracted/plugins/FilePlugin/include/common/FilePlugin.h index 94b1b40cb6..1ec7fc23d2 100644 --- a/extracted/plugins/FilePlugin/include/common/FilePlugin.h +++ b/extracted/plugins/FilePlugin/include/common/FilePlugin.h @@ -53,7 +53,7 @@ squeakFileOffsetType sqFileGetPosition(SQFile *f); sqInt sqFileInit(void); sqInt sqFileShutdown(void); sqInt sqFileOpen(SQFile *f, char *sqFileName, sqInt sqFileNameSize, sqInt writeFlag); -sqInt sqFileOpenNew(SQFile *f, char *sqFileName, sqInt sqFileNameSize, sqInt *exists); +sqInt sqFileOpenNew(SQFile *f, char *sqFileName, sqInt sqFileNameSize, int *exists); sqInt sqConnectToFileDescriptor(SQFile *f, int fd, sqInt writeFlag); sqInt sqConnectToFile(SQFile *f, void *file, sqInt writeFlag); size_t sqFileReadIntoAt(SQFile *f, size_t count, char *byteArrayIndex, size_t startIndex); diff --git a/extracted/plugins/FilePlugin/src/common/sqFilePluginBasicPrims.c b/extracted/plugins/FilePlugin/src/common/sqFilePluginBasicPrims.c index 4db0391e79..95d0765c59 100644 --- a/extracted/plugins/FilePlugin/src/common/sqFilePluginBasicPrims.c +++ b/extracted/plugins/FilePlugin/src/common/sqFilePluginBasicPrims.c @@ -410,7 +410,7 @@ sqFileOpen(SQFile *f, char *sqFileName, sqInt sqFileNameSize, sqInt writeFlag) { } sqInt -sqFileOpenNew(SQFile *f, char *sqFileName, sqInt sqFileNameSize, sqInt *exists) { +sqFileOpenNew(SQFile *f, char *sqFileName, sqInt sqFileNameSize, int *exists) { /* Opens the given file for writing and if possible reading if it does not already exist using the supplied sqFile structure to record its state. diff --git a/extracted/plugins/FilePlugin/src/win/sqWin32FilePrims.c b/extracted/plugins/FilePlugin/src/win/sqWin32FilePrims.c index aca7c678ef..1ae648ce48 100644 --- a/extracted/plugins/FilePlugin/src/win/sqWin32FilePrims.c +++ b/extracted/plugins/FilePlugin/src/win/sqWin32FilePrims.c @@ -212,7 +212,7 @@ sqInt sqFileOpen(SQFile *f, char* fileNameIndex, sqInt fileNameSize, sqInt write return 1; } -sqInt sqFileOpenNew(SQFile *f, char* fileNameIndex, sqInt fileNameSize, sqInt* exists) { +sqInt sqFileOpenNew(SQFile *f, char* fileNameIndex, sqInt fileNameSize, int* exists) { HANDLE h; WCHAR *win32Path = NULL; diff --git a/extracted/plugins/SocketPlugin/src/common/SocketPlugin.c b/extracted/plugins/SocketPlugin/src/common/SocketPlugin.c index 989facd250..f8ed75a128 100644 --- a/extracted/plugins/SocketPlugin/src/common/SocketPlugin.c +++ b/extracted/plugins/SocketPlugin/src/common/SocketPlugin.c @@ -2306,11 +2306,11 @@ socketRecordSize(void) static SocketPtr socketValueOf(sqInt socketOop) { - return ((isBytes(socketOop)) - && ((byteSizeOf(socketOop)) == (sizeof(SQSocket))) - ? ((SocketPtr) (firstIndexableField(socketOop))) - : (primitiveFailFor(PrimErrBadArgument), - null)); + if ((isBytes(socketOop)) && ((byteSizeOf(socketOop)) == (sizeof(SQSocket)))) { + return (SocketPtr) (firstIndexableField(socketOop)); + } + primitiveFailFor(PrimErrBadArgument); + return null; } /* SmartSyntaxInterpreterPlugin>>#sqAssert: */ diff --git a/smalltalksrc/VMMaker/SocketPlugin.class.st b/smalltalksrc/VMMaker/SocketPlugin.class.st index aaa2a4faf1..d598f17887 100644 --- a/smalltalksrc/VMMaker/SocketPlugin.class.st +++ b/smalltalksrc/VMMaker/SocketPlugin.class.st @@ -1048,8 +1048,9 @@ SocketPlugin >> socketValueOf: socketOop [ "Answer a pointer to the first byte of of the socket record within the given Smalltalk object, or nil if socketOop is not a socket record." - ^((interpreterProxy isBytes: socketOop) + ((interpreterProxy isBytes: socketOop) and: [(interpreterProxy byteSizeOf: socketOop) = self socketRecordSize]) - ifTrue: [self cCoerce: (interpreterProxy firstIndexableField: socketOop) to: #SocketPtr] - ifFalse: [interpreterProxy primitiveFailFor: PrimErrBadArgument. nil] + ifFalse: [interpreterProxy primitiveFailFor: PrimErrBadArgument. ^ nil]. + + ^ self cCoerce: (interpreterProxy firstIndexableField: socketOop) to: #SocketPtr ] diff --git a/smalltalksrc/VMMaker/StackInterpreter.class.st b/smalltalksrc/VMMaker/StackInterpreter.class.st index df2c88e43d..882887912b 100644 --- a/smalltalksrc/VMMaker/StackInterpreter.class.st +++ b/smalltalksrc/VMMaker/StackInterpreter.class.st @@ -14736,6 +14736,7 @@ StackInterpreter >> stackPointerIndexForFrame: theFP [ + thePage := stackPages stackPageFor: theFP. theSP := self findSPOf: theFP on: thePage. ^self stackPointerIndexForFrame: theFP WithSP: theSP diff --git a/src/client.c b/src/client.c index cc5a5694ff..a2c8259205 100644 --- a/src/client.c +++ b/src/client.c @@ -32,7 +32,7 @@ void mtfsfi(unsigned long long fpscr) # define mtfsfi(fpscr) #endif -static int loadPharoImage(const char* fileName); +static int loadPharoImage(char* fileName); static void* runVMThread(void* p); static int runOnMainThread(VMParameters *parameters); #ifdef PHARO_VM_IN_WORKER_THREAD @@ -204,10 +204,8 @@ vm_main(int argc, const char** argv, const char** env) } static int -loadPharoImage(const char* fileName) +loadPharoImage(char* fileName) { - struct stat sb; - /* Check image exists */ if (!sqImageFileExists(fileName)) { logErrorFromErrno("Image file not found"); diff --git a/src/parameters/parameters.m b/src/parameters/parameters.m index d2d80d71e0..17dafb9cbd 100644 --- a/src/parameters/parameters.m +++ b/src/parameters/parameters.m @@ -122,7 +122,7 @@ char* valueString = calloc(1, 255+1); CFStringGetCString(value, valueString, 255 + 1, kCFStringEncodingUTF8); - vm_parameter_vector_insert_from(¶meters->imageParameters, 1, &valueString); + vm_parameter_vector_insert_from(¶meters->imageParameters, 1, (const char**) &valueString); } }