diff options
author | Matthew Jordan <mjordan@digium.com> | 2012-11-19 02:14:54 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2012-11-19 02:14:54 +0000 |
commit | 7cf42e90b6114749e27aa3d0aadd3cd2833de48c (patch) | |
tree | 52d70bbc1a6a17fafc4291faf53ca70b93fef0ab /tests/test_astobj2.c | |
parent | 530ce21b5de3f529657635c8eed8632127598ebb (diff) |
Fix uninitialized in this function error
With some versions of gcc, n_buckets will be flagged as being uninitialized
before use. While its technically impossible (since the switch statement,
even without a default, accounts for all possibilities), we'll initialize the
variable to 0 anyway.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests/test_astobj2.c')
-rw-r--r-- | tests/test_astobj2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_astobj2.c b/tests/test_astobj2.c index 95d7e753d..0fdd0bd2d 100644 --- a/tests/test_astobj2.c +++ b/tests/test_astobj2.c @@ -424,7 +424,7 @@ static int astobj2_test_1_helper(int tst_num, enum test_container_type type, int struct ao2_iterator *mult_it; struct test_obj *obj; ao2_callback_fn *cmp_fn; - int n_buckets; + int n_buckets = 0; int increment = 0; int destructor_count = 0; int count; |