<p><a href="https://gerrit.osmocom.org/12880">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12880/2/tests/utils/utils_test.c">File tests/utils/utils_test.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12880/2/tests/utils/utils_test.c@941">Patch Set #2, Line 941:</a> <code style="font-family:monospace,monospace">#pragma GCC diagnostic ignored "-Wformat-truncation"</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Why is this necessary? Do we have to use it every time alongside with OSMO_STRBUF_* as well?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I am deliberately testing to write past a buffer's end, with a locally defined buffer, here: ...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12880/2/tests/utils/utils_test.c@958">Patch Set #2, Line 958:</a> <code style="font-family:monospace,monospace">      char buf[23];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">... 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.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12880">change 12880</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12880"/><meta itemprop="name" content="View Change"/></div></div>

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