summaryrefslogtreecommitdiffstats
path: root/generic/tkOldConfig.c
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 /generic/tkOldConfig.c
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 'generic/tkOldConfig.c')
-rw-r--r--generic/tkOldConfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index 7711e2b..5d8a042 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -781,7 +781,7 @@ FormatConfigValue(
}
break;
case TK_CONFIG_INT:
- snprintf(buffer, sizeof(buffer), "%d", *((int *)ptr));
+ snprintf(buffer, 200, "%d", *((int *)ptr));
result = buffer;
break;
case TK_CONFIG_DOUBLE:
@@ -859,7 +859,7 @@ FormatConfigValue(
result = Tk_NameOfJoinStyle(*((int *)ptr));
break;
case TK_CONFIG_PIXELS:
- snprintf(buffer, sizeof(buffer),"%d", *((int *)ptr));
+ snprintf(buffer, 200, "%d", *((int *)ptr));
result = buffer;
break;
case TK_CONFIG_MM: