libkae: fix build warning on aarch64#22
libkae: fix build warning on aarch64#22parheliamm wants to merge 1 commit intokunpengcompute:masterfrom
Conversation
This patch to fix below error on aarch64 [ 34s] ./utils/engine_log.h:73:13: error: ignoring return value of 'ftruncate' declared with attribute 'warn_unused_result' [-Werror=unused-result] [ 34s] 73 | ftruncate(g_kae_debug_log_file->_fileno, 0); \ [ 34s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 84s] alg/pkey/hpre_rsa.c: In function 'hpre_rsa_private_encrypt': [ 84s] alg/pkey/hpre_rsa.c:546:5: error: 'num_bytes' may be used uninitialized in this function [-Werror=maybe-uninitialized] [ 84s] 546 | hpre_free_bn_ctx_buf(bn_ctx, in_buf, num_bytes); [ 84s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 84s] alg/pkey/hpre_rsa.c: In function 'hpre_rsa_public_encrypt': [ 84s] alg/pkey/hpre_rsa.c:440:5: error: 'num_bytes' may be used uninitialized in this function [-Werror=maybe-uninitialized] [ 84s] 440 | hpre_free_bn_ctx_buf(bn_ctx, in_buf, num_bytes); [ 84s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 84s] alg/pkey/hpre_rsa.c:440:5: error: 'bn_ctx' may be used uninitialized in this function [-Werror=maybe-uninitialized] There is no functional change. Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
|
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). The following commits have not yet signed CLA. f3735b0 | libkae: fix build warning on aarch64 This patch to fix below error on aarch64 [ 84s] alg/pkey/hpre_rsa.c: In function 'hpre_rsa_private_encrypt': There is no functional change. Signed-off-by: Chenxi Mao chenxi.mao@suse.com 📝 Please access here to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment: /check-cla to verify. Thanks.
|
|
|
This patch to fix below error on aarch64
[ 34s] ./utils/engine_log.h:73:13: error: ignoring return value of 'ftruncate' declared with attribute 'warn_unused_result' [-Werror=unused-result]
[ 34s] 73 | ftruncate(g_kae_debug_log_file->_fileno, 0);
[ 34s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 84s] alg/pkey/hpre_rsa.c: In function 'hpre_rsa_private_encrypt':
[ 84s] alg/pkey/hpre_rsa.c:546:5: error: 'num_bytes' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[ 84s] 546 | hpre_free_bn_ctx_buf(bn_ctx, in_buf, num_bytes);
[ 84s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 84s] alg/pkey/hpre_rsa.c: In function 'hpre_rsa_public_encrypt':
[ 84s] alg/pkey/hpre_rsa.c:440:5: error: 'num_bytes' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[ 84s] 440 | hpre_free_bn_ctx_buf(bn_ctx, in_buf, num_bytes);
[ 84s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 84s] alg/pkey/hpre_rsa.c:440:5: error: 'bn_ctx' may be used uninitialized in this function [-Werror=maybe-uninitialized]
There is no functional change.
Signed-off-by: Chenxi Mao chenxi.mao@suse.com