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 authored and andrzej-kaczmarek committed Nov 27, 2024
1 parent cd59fbc commit 263bcfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crypto/tinycrypt/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ pkg.homepage: "http://mynewt.apache.org/"
pkg.keywords:

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

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

0 comments on commit 263bcfa

Please sign in to comment.