diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-16 16:37:55 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-16 16:16:08 +0000 |
commit | c30a76b2d49265ba6b7ab9e1d684b507b3bfc5f4 (patch) | |
tree | 9d2db6900e2196ae800c3acb51c8979e7e2d517c /utils | |
parent | e2640ef763e1335d0eec590ceaeaa390428cfd51 (diff) |
utils: Fix false positive in compiler warning
Fixes the warning below:
warning: ‘sqn’ may be used uninitialized in this function [-Wmaybe-uninitialized]
fprintf(stderr, "Requesting --sqn %"PRIu64" implies IND=%u,"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
" so no further --ind argument is allowed.\n",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sqn, test_aud.u.umts.ind);
~~~~~~~~~~~~~~~~~~~~~~~~~
The warning is a false positive as sqn is only used in case
sqn_is_set!=0, and in that code path, sqn is set.
Change-Id: Ib5903db01ea6765bd6bb688e63f70925c5012f98
Diffstat (limited to 'utils')
-rw-r--r-- | utils/osmo-auc-gen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c index 9d1215c8..ec9bad88 100644 --- a/utils/osmo-auc-gen.c +++ b/utils/osmo-auc-gen.c @@ -98,7 +98,7 @@ int main(int argc, char **argv) struct osmo_auth_vector _vec; struct osmo_auth_vector *vec = &_vec; uint8_t _rand[16], _auts[14]; - uint64_t sqn; + uint64_t sqn = 0; unsigned int ind = 0; int rc, option_index; int rand_is_set = 0; |