Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a116f3

Browse files
committed
Squashed compiler warnings by adding casts, making sure prototypes are in
scope and looking at types.
1 parent 446f323 commit 0a116f3

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

Modules/getpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ calculate_path(void)
421421
*/
422422
pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize"));
423423
/* Use dylib functions to find out where the framework was loaded from */
424-
buf = NSLibraryNameForModule(pythonModule);
424+
buf = (char *)NSLibraryNameForModule(pythonModule);
425425
if (buf != NULL) {
426426
/* We're in a framework. */
427427
/* See if we might be in the build directory. The framework in the

Modules/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ extern PyObject* pyvms_gr_empty_string;
1313
#include <fcntl.h>
1414
#endif
1515

16+
#if defined(WITH_NEXT_FRAMEWORK)
17+
#include "pymactoolbox.h"
18+
#endif
19+
1620
#if (defined(PYOS_OS2) && !defined(PYCC_GCC)) || defined(MS_WINDOWS)
1721
#define PYTHONHOMEHELP "<prefix>\\lib"
1822
#else

Python/dynload_next.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
7777
newModule = NSLinkModule(image, pathname, LINKOPTIONS);
7878
if (newModule == NULL) {
7979
int errNo;
80-
char *fileName, *moreErrorStr;
80+
const char *fileName, *moreErrorStr;
8181
NSLinkEditErrors c;
8282
NSLinkEditError( &c, &errNo, &fileName, &moreErrorStr );
8383
PyOS_snprintf(errBuf, 512, "Failure linking new module: %s: %s",

Python/mactoolboxglue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ char *PyMac_getscript()
5353
/* This leaks a an object. */
5454
name = CFStringConvertEncodingToIANACharSetName(enc);
5555
}
56-
return CFStringGetCStringPtr(name, 0);
56+
return (char *)CFStringGetCStringPtr(name, 0);
5757
#else
5858
int font, script, lang;
5959
font = 0;

0 commit comments

Comments
 (0)