Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12880 )

Change subject: add OSMO_STRBUF_PRINTF()
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/12880/2/tests/utils/utils_test.c
File tests/utils/utils_test.c:

https://gerrit.osmocom.org/#/c/12880/2/tests/utils/utils_test.c@941
PS2, Line 941: #pragma GCC diagnostic ignored "-Wformat-truncation"
> Why is this necessary? Do we have to use it every time alongside with 
> OSMO_STRBUF_* as well?
I am deliberately testing to write past a buffer's end, with a locally defined 
buffer, here: ...


https://gerrit.osmocom.org/#/c/12880/2/tests/utils/utils_test.c@958
PS2, Line 958:  char buf[23];
... and gcc then thinks that it must check the buffer bounds and warn that 
snprintf() will write past the buffer. Above compiler directive tells it that 
this is exactly what I want to test and it shouldn't bother checking the bounds 
for me.



--
To view, visit https://gerrit.osmocom.org/12880
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2497514e26c5e7a5d88985fc7e58343be1a027b2
Gerrit-Change-Number: 12880
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-CC: Max <msur...@sysmocom.de>
Gerrit-Comment-Date: Wed, 13 Feb 2019 12:37:56 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Reply via email to