<p>laforge <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/14149">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix isdigit taking unsigned as input<br><br>fixes the following error warnings when cross-compiling using:<br>./configure --enable-static --prefix=/usr/local/arm-none-eabi --host=arm-none-eabi --enable-embedded --disable-doxygen --disable-shared --disable-pseudotalloc --enable-external-tests CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -Wno-error=format"<br><br>utils.c:1002:18: error: array subscript has type 'char' [-Werror=char-subscripts]<br> 1002 |   if (!isdigit(in[i]))<br><br>gsm23003.c:414:34: error: array subscript has type 'char' [-Werror=char-subscripts]<br>  414 |  if (!mnc_str || !isdigit(mnc_str[0]) || strlen(mnc_str) > 3)<br><br>Change-Id: Ia13fd5ee79fc6dc3291c0b99958ab3c01afee17d<br>---<br>M src/gsm/gsm23003.c<br>M src/utils.c<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c</span><br><span>index 4cc2671..e20afcb 100644</span><br><span>--- a/src/gsm/gsm23003.c</span><br><span>+++ b/src/gsm/gsm23003.c</span><br><span>@@ -411,7 +411,7 @@</span><br><span>     char *endptr;</span><br><span>        int rc = 0;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (!mnc_str || !isdigit(mnc_str[0]) || strlen(mnc_str) > 3)</span><br><span style="color: hsl(120, 100%, 40%);">+       if (!mnc_str || !isdigit((unsigned char)mnc_str[0]) || strlen(mnc_str) > 3)</span><br><span>               return -EINVAL;</span><br><span> </span><br><span>  errno = 0;</span><br><span>diff --git a/src/utils.c b/src/utils.c</span><br><span>index 7b7178c..7364bfb 100644</span><br><span>--- a/src/utils.c</span><br><span>+++ b/src/utils.c</span><br><span>@@ -999,7 +999,7 @@</span><br><span> </span><br><span>        /* All input must be numbers */</span><br><span>      for (i = 0; i < in_len; i++) {</span><br><span style="color: hsl(0, 100%, 40%);">-               if (!isdigit(in[i]))</span><br><span style="color: hsl(120, 100%, 40%);">+          if (!isdigit((unsigned char)in[i]))</span><br><span>                  return -EINVAL;</span><br><span>      }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/14149">change 14149</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/c/libosmocore/+/14149"/><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-Change-Id: Ia13fd5ee79fc6dc3291c0b99958ab3c01afee17d </div>
<div style="display:none"> Gerrit-Change-Number: 14149 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: K√©vin Redon <kredon@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>