Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libkae: fix build warning on aarch64 #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 29, 2021

  1. libkae: fix build warning on aarch64

    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 <[email protected]>
    Chenxi Mao committed Oct 29, 2021
    Configuration menu
    Copy the full SHA
    f3735b0 View commit details
    Browse the repository at this point in the history