summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-04 21:52:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-04 21:52:10 (GMT)
commitc565904256ce552372be8e3f3171082bb0cf51f7 (patch)
treec44d1cb87ddb9ee27228b47fac1d2dd48b947de2 /macosx/tkMacOSXInit.c
parent5a03048c707ee966457a12a6901c488012ecde2c (diff)
downloadtk-c565904256ce552372be8e3f3171082bb0cf51f7.zip
tk-c565904256ce552372be8e3f3171082bb0cf51f7.tar.gz
tk-c565904256ce552372be8e3f3171082bb0cf51f7.tar.bz2
More serious elimination of -Wconversion C warnings
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r--macosx/tkMacOSXInit.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 8eb1fb6..039d1d1 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -258,8 +258,8 @@ static int TkMacOSVersionObjCmd(ClientData cd, Tcl_Interp *ip,
#else
NSOperatingSystemVersion systemVersion;
systemVersion = [[NSProcessInfo processInfo] operatingSystemVersion];
- majorVersion = systemVersion.majorVersion;
- minorVersion = systemVersion.minorVersion;
+ majorVersion = (int)systemVersion.majorVersion;
+ minorVersion = (int)systemVersion.minorVersion;
#endif
if (majorVersion == 10 && minorVersion == 16) {
@@ -275,7 +275,7 @@ static int TkMacOSVersionObjCmd(ClientData cd, Tcl_Interp *ip,
struct utsname name;
char *endptr;
if (uname(&name) == 0) {
- majorVersion = strtol(name.release, &endptr, 10) - 9;
+ majorVersion = (int)strtol(name.release, &endptr, 10) - 9;
minorVersion = 0;
}
}
@@ -430,7 +430,7 @@ TCL_NORETURN void TkpExitProc(
if (doCleanup == YES) {
[(TKApplication *)NSApp superTerminate:nil]; /* Should not return. */
}
- exit((long)clientdata); /* Convince the compiler that we don't return. */
+ exit((int)PTR2INT(clientdata)); /* Convince the compiler that we don't return. */
}
#endif
@@ -715,7 +715,7 @@ TkMacOSXGetAppPathObjCmd(
*/
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- CFStringGetCStringPtr(appPath, CFStringGetSystemEncoding()), -1));
+ CFStringGetCStringPtr(appPath, CFStringGetSystemEncoding()), TCL_INDEX_NONE));
CFRelease(mainBundleURL);
CFRelease(appPath);
@@ -757,7 +757,7 @@ TkpGetAppName(
name = p+1;
}
}
- Tcl_DStringAppend(namePtr, name, -1);
+ Tcl_DStringAppend(namePtr, name, TCL_INDEX_NONE);
}
/*
@@ -822,9 +822,9 @@ TkpDisplayWarning(
Tcl_Channel errChannel = Tcl_GetStdChannel(TCL_STDERR);
if (errChannel) {
- Tcl_WriteChars(errChannel, title, -1);
+ Tcl_WriteChars(errChannel, title, TCL_INDEX_NONE);
Tcl_WriteChars(errChannel, ": ", 2);
- Tcl_WriteChars(errChannel, msg, -1);
+ Tcl_WriteChars(errChannel, msg, TCL_INDEX_NONE);
Tcl_WriteChars(errChannel, "\n", 1);
}
}
@@ -865,7 +865,7 @@ TkMacOSXDefaultStartupScript(void)
if (CFURLGetFileSystemRepresentation(appMainURL, true,
(unsigned char *) startupScript, PATH_MAX)) {
- Tcl_SetStartupScript(Tcl_NewStringObj(startupScript,-1), NULL);
+ Tcl_SetStartupScript(Tcl_NewStringObj(startupScript, TCL_INDEX_NONE), NULL);
scriptFldrURL = CFURLCreateCopyDeletingLastPathComponent(NULL,
appMainURL);
if (scriptFldrURL != NULL) {