mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-18 10:36:52 +00:00
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:
parent
5af8c5adb2
commit
44035fcab4
@ -101,7 +101,7 @@ void module_role_tests(policydb_t * base)
|
|||||||
{
|
{
|
||||||
role_datum_t *role;
|
role_datum_t *role;
|
||||||
avrule_decl_t *decl;
|
avrule_decl_t *decl;
|
||||||
unsigned int decls[2];
|
unsigned int decls[3];
|
||||||
char *types[3];
|
char *types[3];
|
||||||
|
|
||||||
/* These tests are run when the base is linked with 2 modules,
|
/* These tests are run when the base is linked with 2 modules,
|
||||||
|
Loading…
Reference in New Issue
Block a user