diff options
| author | Tyge Løvset <[email protected]> | 2022-11-22 16:12:35 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-11-22 16:12:35 +0100 |
| commit | 72f75574edea7a864d5784e38d7d90315c2b2190 (patch) | |
| tree | 74e5b097b75c8d13faacc781106c4b99a1040169 /include/stc/coption.h | |
| parent | 512cba08af831a864e09d34f02250820d3d76883 (diff) | |
| download | STC-modified-72f75574edea7a864d5784e38d7d90315c2b2190.tar.gz STC-modified-72f75574edea7a864d5784e38d7d90315c2b2190.zip | |
Fixes of -Wconversion warnings (not examples).
Diffstat (limited to 'include/stc/coption.h')
| -rw-r--r-- | include/stc/coption.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/coption.h b/include/stc/coption.h index db715f5c..6b01c5a3 100644 --- a/include/stc/coption.h +++ b/include/stc/coption.h @@ -129,7 +129,7 @@ static int coption_get(coption *opt, int argc, char *argv[], const coption_long *o = 0, *o_exact = 0, *o_partial = 0; for (j = 2; argv[opt->_i][j] != '\0' && argv[opt->_i][j] != '='; ++j) {} /* find the end of the option name */ for (k = 0; longopts[k].name != 0; ++k) - if (strncmp(&argv[opt->_i][2], longopts[k].name, j - 2) == 0) { + if (strncmp(&argv[opt->_i][2], longopts[k].name, (size_t)(j - 2)) == 0) { if (longopts[k].name[j - 2] == 0) ++n_exact, o_exact = &longopts[k]; else ++n_partial, o_partial = &longopts[k]; } |
