<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11271">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_client_send_data: Fix wrong log format<br><br>According to pcap.h, type bpf_u_int32 can be 32 bits on some systems,<br>so better cast explicitly to size_t to make sure always correct size is<br>used by log function.<br><br>Fixes warning:<br>osmo-pcap/src/osmo_client_network.c:175:4: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘bpf_u_int32’ {aka ‘unsigned int’} [-Wformat=]<br>    "Capture len too big %zu\n", in_hdr->caplen);<br>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~<br><br>Change-Id: I98654da143218d3e57da4e57781252eb3d3f3d5b<br>---<br>M src/osmo_client_network.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/71/11271/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo_client_network.c b/src/osmo_client_network.c</span><br><span>index ec03b09..3d741a8 100644</span><br><span>--- a/src/osmo_client_network.c</span><br><span>+++ b/src/osmo_client_network.c</span><br><span>@@ -172,7 +172,7 @@</span><br><span> </span><br><span>      if (in_hdr->caplen > 9000) {</span><br><span>           LOGP(DCLIENT, LOGL_ERROR,</span><br><span style="color: hsl(0, 100%, 40%);">-                       "Capture len too big %zu\n", in_hdr->caplen);</span><br><span style="color: hsl(120, 100%, 40%);">+                    "Capture len too big %zu\n", (size_t) in_hdr->caplen);</span><br><span>          rate_ctr_inc(&conn->client->ctrg->ctr[CLIENT_CTR_2BIG]);</span><br><span>                return;</span><br><span>      }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11271">change 11271</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/11271"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcap </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I98654da143218d3e57da4e57781252eb3d3f3d5b </div>
<div style="display:none"> Gerrit-Change-Number: 11271 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>