diff options
author | fvogel <fvogelnew1@free.fr> | 2023-01-10 22:02:07 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-01-10 22:02:07 (GMT) |
commit | de829322e7a608e3f34d647a6674c32909c24689 (patch) | |
tree | e1bf010662468253e4acc69da003c61f1558df61 /unix/tkUnixSelect.c | |
parent | 7249bffdfb065bb08b668338d6c68291fa19654b (diff) | |
download | tk-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.c | 4 |
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); |