libsepol/tests: fix gcc -Warray-bounds warning

test-linker-roles.c: In function 'module_role_tests':
  test-linker-roles.c:147:7: error: array subscript is above array bounds
  [-Werror=array-bounds]
    decls[2] = (test_find_decl_by_sym(base, SYM_TYPES,"tag_g_m2"))->decl_id;
         ^

Acked-by: Steve Lawrence <slawrence@tresys.com>
This commit is contained in:
Nicolas Iooss 2014-09-14 23:41:51 +02:00 committed by Steve Lawrence
parent 5af8c5adb2
commit 44035fcab4
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ void module_role_tests(policydb_t * base)
{
role_datum_t *role;
avrule_decl_t *decl;
unsigned int decls[2];
unsigned int decls[3];
char *types[3];
/* These tests are run when the base is linked with 2 modules,