diff mbox series

[6/9] xsm/flask: Use explicitly specified types

Message ID 20220620070245.77979-7-michal.orzel@arm.com (mailing list archive)
State New, archived
Headers show
Series MISRA C 2012 8.1 rule fixes | expand

Commit Message

Michal Orzel June 20, 2022, 7:02 a.m. UTC
According to MISRA C 2012 Rule 8.1, types shall be explicitly
specified. Fix all the findings reported by cppcheck with misra addon
by substituting implicit type 'unsigned' to explicit 'unsigned int'.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
---
 xen/xsm/flask/ss/avtab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Andryuk June 21, 2022, 2:27 p.m. UTC | #1
On Mon, Jun 20, 2022 at 3:03 AM Michal Orzel <michal.orzel@arm.com> wrote:
>
> According to MISRA C 2012 Rule 8.1, types shall be explicitly
> specified. Fix all the findings reported by cppcheck with misra addon
> by substituting implicit type 'unsigned' to explicit 'unsigned int'.
>
> Signed-off-by: Michal Orzel <michal.orzel@arm.com>

Reviewed-by: Jason Andryuk <jandryuk@gmail.com>

Thanks,
Jason
diff mbox series

Patch

diff --git a/xen/xsm/flask/ss/avtab.c b/xen/xsm/flask/ss/avtab.c
index 017f5183de..9761d028d8 100644
--- a/xen/xsm/flask/ss/avtab.c
+++ b/xen/xsm/flask/ss/avtab.c
@@ -349,7 +349,7 @@  int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol,
     struct avtab_key key;
     struct avtab_datum datum;
     int i, rc;
-    unsigned set;
+    unsigned int set;
 
     memset(&key, 0, sizeof(struct avtab_key));
     memset(&datum, 0, sizeof(struct avtab_datum));