diff options
author | fvogel <fvogelnew1@free.fr> | 2023-01-12 00:04:55 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-01-12 00:04:55 (GMT) |
commit | 91c03f8f7b13c7f0c997749c6808cd01db9807a3 (patch) | |
tree | f9ffd1e4bcab63d71c9d4ba131d867cbeca55db2 /generic/tkOldConfig.c | |
parent | 12c0146aaec25379a108581c8582dd79eedcc066 (diff) | |
download | tk-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.c | 4 |
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: |