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 /unix/tkUnixSend.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 'unix/tkUnixSend.c')
-rw-r--r-- | unix/tkUnixSend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 523f178..bd33576 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1796,7 +1796,7 @@ AppendErrorProc( pcPtr = pcPtr->nextPtr) { if ((pcPtr == pendingPtr) && (pcPtr->result == NULL)) { pcPtr->result = (char *)ckalloc(strlen(pcPtr->target) + 50); - snprintf(pcPtr->result, sizeof(pcPtr->result), "no application named \"%s\"", + snprintf(pcPtr->result, strlen(pcPtr->target) + 50, "no application named \"%s\"", pcPtr->target); pcPtr->code = TCL_ERROR; pcPtr->gotResponse = 1; |