diff options
author | fvogel <fvogelnew1@free.fr> | 2023-01-18 20:23:38 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-01-18 20:23:38 (GMT) |
commit | e1fdc1e995e1e01172159c960f7fe8d611cfaf64 (patch) | |
tree | 66f5ec6ffcc6e3d649cc3d98b77882fbe92807e6 /unix/tkUnixSysTray.c | |
parent | f413e249b3c0711dbefa5521ed2cc26c5bd20968 (diff) | |
parent | bc9027416eca9c0e52af3a412e4e012bc2495511 (diff) | |
download | tk-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.c | 5 |
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); |