You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wd.c: In function 'wd_is_isolate':
wd.c:193:21: error: the comparison will always evaluate as 'true' for the address of 'dev_root' will never be NULL [-Werror=address]
193 | if (!dev || !dev->dev_root)
| ^
In file included from wd.c:21:
./include/wd.h:131:14: note: 'dev_root' declared here
131 | char dev_root[PATH_STR_SIZE];
| ^~~~~~~~
dev_root being an initialized array, it cannot be NULL.
It should be fixed with this patch:
--- a/wd.c
+++ b/wd.c
@@ -190,7 +190,7 @@ int wd_is_isolate(struct uacce_dev *dev)
int value = 0;
int ret;
- if (!dev || !dev->dev_root)
+ if (!dev)
return -WD_EINVAL;
ret = access_attr(dev->dev_root, "isolate", F_OK);
The text was updated successfully, but these errors were encountered:
GCC 12 emits this error:
dev_root being an initialized array, it cannot be NULL.
It should be fixed with this patch:
The text was updated successfully, but these errors were encountered: