summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixSelect.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-01-10 22:02:07 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-01-10 22:02:07 (GMT)
commitde829322e7a608e3f34d647a6674c32909c24689 (patch)
treee1bf010662468253e4acc69da003c61f1558df61 /unix/tkUnixSelect.c
parent7249bffdfb065bb08b668338d6c68291fa19654b (diff)
downloadtk-de829322e7a608e3f34d647a6674c32909c24689.zip
tk-de829322e7a608e3f34d647a6674c32909c24689.tar.gz
tk-de829322e7a608e3f34d647a6674c32909c24689.tar.bz2
Eradicate uses of sprintf because it triggers deprecation warning on macOS Ventura. Only a single instance left in TkpPrintWindowId() (tkWinWindow.c).
Diffstat (limited to 'unix/tkUnixSelect.c')
-rw-r--r--unix/tkUnixSelect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index 527bc4c..aec6c31 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -1511,7 +1511,7 @@ SelCvtFromX32(
} else {
char buf[12];
- sprintf(buf, "0x%x", (unsigned int) *propPtr);
+ snprintf(buf, sizeof(buf), "0x%x", (unsigned int) *propPtr);
Tcl_DStringAppendElement(dsPtr, buf);
}
}
@@ -1537,7 +1537,7 @@ SelCvtFromX8(
for ( ; numValues > 0; propPtr++, numValues--) {
char buf[12];
- sprintf(buf, "0x%x", (unsigned char) *propPtr);
+ snprintf(buf, sizeof(buf), "0x%x", (unsigned char) *propPtr);
Tcl_DStringAppendElement(dsPtr, buf);
}
Tcl_DStringAppend(dsPtr, " ", 1);