summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixSysTray.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-01-18 20:23:38 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-01-18 20:23:38 (GMT)
commite1fdc1e995e1e01172159c960f7fe8d611cfaf64 (patch)
tree66f5ec6ffcc6e3d649cc3d98b77882fbe92807e6 /unix/tkUnixSysTray.c
parentf413e249b3c0711dbefa5521ed2cc26c5bd20968 (diff)
parentbc9027416eca9c0e52af3a412e4e012bc2495511 (diff)
downloadtk-e1fdc1e995e1e01172159c960f7fe8d611cfaf64.zip
tk-e1fdc1e995e1e01172159c960f7fe8d611cfaf64.tar.gz
tk-e1fdc1e995e1e01172159c960f7fe8d611cfaf64.tar.bz2
Merge core-8-6-branch: Eradicate uses of sprintf because it triggers deprecation warning on macOS Ventura. Resolve conflicts. Remove sprintf calls specific to the main branch.
Diffstat (limited to 'unix/tkUnixSysTray.c')
-rw-r--r--unix/tkUnixSysTray.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/unix/tkUnixSysTray.c b/unix/tkUnixSysTray.c
index 56a9844..faab097 100644
--- a/unix/tkUnixSysTray.c
+++ b/unix/tkUnixSysTray.c
@@ -435,8 +435,7 @@ DockSelectionAtomFor(
Tk_Window tkwin)
{
char buf[256];
- /* no snprintf in C89 */
- sprintf(buf,"_NET_SYSTEM_TRAY_S%d",Tk_ScreenNumber(tkwin));
+ snprintf(buf,256,"_NET_SYSTEM_TRAY_S%d",Tk_ScreenNumber(tkwin));
return Tk_InternAtom(tkwin,buf);
}
@@ -558,7 +557,7 @@ CheckArgbVisual(
retNitems == 1 &&
retFormat == 32) {
char numeric[256];
- sprintf(numeric,"%ld",*(long*)retProp);
+ snprintf(numeric,256,"%ld",*(long*)retProp);
XFree(retProp);
match = Tk_GetVisual(icon->interp, icon->tkwin,
numeric, &depth, &cmap);