From f266f7920f0f58b71f2755a8cbad284f1848316c Mon Sep 17 00:00:00 2001
From: Wenkai Lin <linwenkai6@hisilicon.com>
Date: Tue, 15 Feb 2022 11:49:56 +0800
Subject: [PATCH 63/64] uadk: fix staic check warning

1.fix unterminated string.
2.fix bit operation of int data.

Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
---
 wd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wd.c b/wd.c
index afcf134..565c173 100644
--- a/wd.c
+++ b/wd.c
@@ -77,7 +77,7 @@ static int get_raw_attr(const char *dev_root, const char *attr, char *buf,
 
 static int get_int_attr(struct uacce_dev *dev, const char *attr, int *val)
 {
-	char buf[MAX_ATTR_STR_SIZE] = {0};
+	char buf[MAX_ATTR_STR_SIZE] = {'\0'};
 	int ret;
 
 	ret = get_raw_attr(dev->dev_root, attr, buf, MAX_ATTR_STR_SIZE - 1);
@@ -150,7 +150,7 @@ static int get_dev_info(struct uacce_dev *dev)
 	ret = get_int_attr(dev, "flags", &dev->flags);
 	if (ret < 0)
 		return ret;
-	else if (!(dev->flags & UACCE_DEV_SVA)) {
+	else if (!((unsigned int)dev->flags & UACCE_DEV_SVA)) {
 		WD_ERR("skip none sva uacce device!\n");
 		return -ENODEV;
 	}
-- 
2.25.1

