From 0a116f3a2901b040faa356ffc3dbb91a7f00d215 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 23 Dec 2002 21:03:36 +0000 Subject: Squashed compiler warnings by adding casts, making sure prototypes are in scope and looking at types. --- Modules/getpath.c | 2 +- Modules/main.c | 4 ++++ Python/dynload_next.c | 2 +- Python/mactoolboxglue.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Modules/getpath.c b/Modules/getpath.c index ee97271..54b57c7 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -421,7 +421,7 @@ calculate_path(void) */ pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); /* Use dylib functions to find out where the framework was loaded from */ - buf = NSLibraryNameForModule(pythonModule); + buf = (char *)NSLibraryNameForModule(pythonModule); if (buf != NULL) { /* We're in a framework. */ /* See if we might be in the build directory. The framework in the diff --git a/Modules/main.c b/Modules/main.c index 2005f0b..ca382c6 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -13,6 +13,10 @@ extern PyObject* pyvms_gr_empty_string; #include #endif +#if defined(WITH_NEXT_FRAMEWORK) +#include "pymactoolbox.h" +#endif + #if (defined(PYOS_OS2) && !defined(PYCC_GCC)) || defined(MS_WINDOWS) #define PYTHONHOMEHELP "\\lib" #else diff --git a/Python/dynload_next.c b/Python/dynload_next.c index 0b232f1..cf42cb7 100644 --- a/Python/dynload_next.c +++ b/Python/dynload_next.c @@ -77,7 +77,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, newModule = NSLinkModule(image, pathname, LINKOPTIONS); if (newModule == NULL) { int errNo; - char *fileName, *moreErrorStr; + const char *fileName, *moreErrorStr; NSLinkEditErrors c; NSLinkEditError( &c, &errNo, &fileName, &moreErrorStr ); PyOS_snprintf(errBuf, 512, "Failure linking new module: %s: %s", diff --git a/Python/mactoolboxglue.c b/Python/mactoolboxglue.c index 6d39d57..3dfd699 100644 --- a/Python/mactoolboxglue.c +++ b/Python/mactoolboxglue.c @@ -53,7 +53,7 @@ char *PyMac_getscript() /* This leaks a an object. */ name = CFStringConvertEncodingToIANACharSetName(enc); } - return CFStringGetCStringPtr(name, 0); + return (char *)CFStringGetCStringPtr(name, 0); #else int font, script, lang; font = 0; -- cgit v0.12