summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-01-12 00:04:55 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-01-12 00:04:55 (GMT)
commit91c03f8f7b13c7f0c997749c6808cd01db9807a3 (patch)
treef9ffd1e4bcab63d71c9d4ba131d867cbeca55db2 /macosx
parent12c0146aaec25379a108581c8582dd79eedcc066 (diff)
downloadtk-91c03f8f7b13c7f0c997749c6808cd01db9807a3.zip
tk-91c03f8f7b13c7f0c997749c6808cd01db9807a3.tar.gz
tk-91c03f8f7b13c7f0c997749c6808cd01db9807a3.tar.bz2
Provide explicit size in snprintf when needed. Fix gcc warning: 'argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]'
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXPort.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h
index b5aa459..2a50663 100644
--- a/macosx/tkMacOSXPort.h
+++ b/macosx/tkMacOSXPort.h
@@ -162,7 +162,7 @@
*/
#define TkpPrintWindowId(buf,w) \
- snprintf((buf), sizeof(buf), "0x%lx", (unsigned long) (w))
+ snprintf((buf), TCL_INTEGER_SPACE, "0x%lx", (unsigned long) (w))
/*
* Turn off Tk double-buffering as Aqua windows are already double-buffered.