Skip to content

Commit

Permalink
crypto: tinycrypt: Fix spurious uninitialized array error
Browse files Browse the repository at this point in the history
This disables maybe-uninitialized compilation option in tinycrypt
library to fix spurious compilation errors.

Error: In function 'uECC_vli_modMult_fast',
    inlined from 'uECC_vli_modSquare_fast' at repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:386:2,
    inlined from 'XYcZ_addC' at repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:702:2:
repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:377:9: error: 't5' may be used uninitialized [-Werror=maybe-uninitialized]
  377 |         uECC_vli_mult(product, left, right, curve->num_words);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
MariuszSkamra committed Nov 26, 2024
1 parent 2c5ce7f commit 4c11a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/tinycrypt/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pkg.homepage: "http://mynewt.apache.org/"
pkg.keywords:

pkg.cflags:
- "-std=c99"
- "-std=c99 -Wno-maybe-uninitialized"

pkg.deps.TINYCRYPT_UECC_RNG_USE_TRNG:
- "@apache-mynewt-core/hw/drivers/trng"
Expand Down

0 comments on commit 4c11a07

Please sign in to comment.