* [PATCH] lib: rsa: cosmetic: fix building warning
@ 2022-12-06 7:41 Haijun Qin
2022-12-07 1:08 ` Simon Glass
2023-01-12 15:17 ` Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Haijun Qin @ 2022-12-06 7:41 UTC (permalink / raw)
To: u-boot; +Cc: zhuwenjun, zhengyu, jinyanjiang, qinhaijun, zhangdongdong
add initialization of variable 'node',this can aviod the building
warning:
'node' may be used uninitialized [-Wmaybe-uninitialized]
Signed-off-by: Haijun Qin <qinhaijun@eswincomputing.com>
---
lib/rsa/rsa-sign.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index b2a21199e4..d20bdb58a5 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -608,7 +608,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest)
BIGNUM *modulus, *r_squared;
uint64_t exponent;
uint32_t n0_inv;
- int parent, node;
+ int parent, node = -FDT_ERR_NOTFOUND;
char name[100];
int ret;
int bits;
base-commit: d2c5607edde2544e059fa871927877213f6bd532
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] lib: rsa: cosmetic: fix building warning
2022-12-06 7:41 [PATCH] lib: rsa: cosmetic: fix building warning Haijun Qin
@ 2022-12-07 1:08 ` Simon Glass
2022-12-07 3:10 ` Haijun Qin
2023-01-12 15:17 ` Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Simon Glass @ 2022-12-07 1:08 UTC (permalink / raw)
To: Haijun Qin; +Cc: u-boot, zhuwenjun, zhengyu, jinyanjiang, zhangdongdong
On Wed, 7 Dec 2022 at 03:50, Haijun Qin <qinhaijun@eswincomputing.com> wrote:
>
> add initialization of variable 'node',this can aviod the building
> warning:
>
> 'node' may be used uninitialized [-Wmaybe-uninitialized]
>
> Signed-off-by: Haijun Qin <qinhaijun@eswincomputing.com>
> ---
> lib/rsa/rsa-sign.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
What toolchain is this?
>
> diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
> index b2a21199e4..d20bdb58a5 100644
> --- a/lib/rsa/rsa-sign.c
> +++ b/lib/rsa/rsa-sign.c
> @@ -608,7 +608,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest)
> BIGNUM *modulus, *r_squared;
> uint64_t exponent;
> uint32_t n0_inv;
> - int parent, node;
> + int parent, node = -FDT_ERR_NOTFOUND;
> char name[100];
> int ret;
> int bits;
>
> base-commit: d2c5607edde2544e059fa871927877213f6bd532
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] lib: rsa: cosmetic: fix building warning
2022-12-07 1:08 ` Simon Glass
@ 2022-12-07 3:10 ` Haijun Qin
0 siblings, 0 replies; 4+ messages in thread
From: Haijun Qin @ 2022-12-07 3:10 UTC (permalink / raw)
To: Simon Glass; +Cc: u-boot, zhuwenjun, zhengyu, jinyanjiang, zhangdongdong
Hi,Simon
The toolchain source code we use comes from here(https://github.com/riscv-collab/riscv-gnu-toolchain), but we have made some changes.
> On Wed, 7 Dec 2022 at 03:50, Haijun Qin <qinhaijun@eswincomputing.com> wrote:
> >
> > add initialization of variable 'node',this can aviod the building
> > warning:
> >
> > 'node' may be used uninitialized [-Wmaybe-uninitialized]
> >
> > Signed-off-by: Haijun Qin <qinhaijun@eswincomputing.com>
> > ---
> > lib/rsa/rsa-sign.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> What toolchain is this?
>
>
> >
> > diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
> > index b2a21199e4..d20bdb58a5 100644
> > --- a/lib/rsa/rsa-sign.c
> > +++ b/lib/rsa/rsa-sign.c
> > @@ -608,7 +608,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest)
> > BIGNUM *modulus, *r_squared;
> > uint64_t exponent;
> > uint32_t n0_inv;
> > - int parent, node;
> > + int parent, node = -FDT_ERR_NOTFOUND;
> > char name[100];
> > int ret;
> > int bits;
> >
> > base-commit: d2c5607edde2544e059fa871927877213f6bd532
> > --
> > 2.17.1
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lib: rsa: cosmetic: fix building warning
2022-12-06 7:41 [PATCH] lib: rsa: cosmetic: fix building warning Haijun Qin
2022-12-07 1:08 ` Simon Glass
@ 2023-01-12 15:17 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2023-01-12 15:17 UTC (permalink / raw)
To: Haijun Qin; +Cc: u-boot, zhuwenjun, zhengyu, jinyanjiang, zhangdongdong
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
On Tue, Dec 06, 2022 at 03:41:37PM +0800, Haijun Qin wrote:
> add initialization of variable 'node',this can aviod the building
> warning:
>
> 'node' may be used uninitialized [-Wmaybe-uninitialized]
>
> Signed-off-by: Haijun Qin <qinhaijun@eswincomputing.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-12 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 7:41 [PATCH] lib: rsa: cosmetic: fix building warning Haijun Qin
2022-12-07 1:08 ` Simon Glass
2022-12-07 3:10 ` Haijun Qin
2023-01-12 15:17 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.