ACK: [PATCH] fwts_devicetree: clean up static analysis warning
ivanhu
ivan.hu at canonical.com
Thu Sep 23 02:38:28 UTC 2021
On 9/22/21 4:48 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The variable length should be initialized to zero to clean up
> an overly pedantic static analysis warning of an uninitialized
> variable.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_devicetree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_devicetree.c b/src/lib/src/fwts_devicetree.c
> index 5556446c..dcd5f5f0 100644
> --- a/src/lib/src/fwts_devicetree.c
> +++ b/src/lib/src/fwts_devicetree.c
> @@ -265,7 +265,7 @@ int fwts_dt_stringlist_count(
> const char *property)
> {
> const char *list, *end;
> - int length, count = 0;
> + int length = 0, count = 0;
>
> list = fdt_getprop(fdt, nodeoffset, property, &length);
> if (!list) {
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list