Skip to content

Build warning when MBEDTLS_ECDSA_SIGN_ALT is defined #7407

@Harshal5

Description

@Harshal5

Summary

When MBEDTLS_ECDSA_SIGN_ALT is defined and we build by adding the -Wmissing-prototypes flag in the WARNING_CFLAGS of the Makefile, the following warning is observed:

  CC    ecdsa.c
ecdsa.c:409:5: warning: no previous prototype for function 'mbedtls_ecdsa_sign_det_restartable' [-Wmissing-prototypes]
int mbedtls_ecdsa_sign_det_restartable(mbedtls_ecp_group *grp,
    ^
ecdsa.c:409:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mbedtls_ecdsa_sign_det_restartable(mbedtls_ecp_group *grp,
^
static 
1 warning generated.

System information

Mbed TLS version (number or commit id): tag: v3.4.0 (1873d3b)
Operating system and version: MacOS Ventura 13.3
Configuration (if not default, please attach mbedtls_config.h): mbedtls_config.zip
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): GNU Make 3.81 / Apple clang version 14.0.3
Additional environment information: NA

Expected behavior

No build error

Actual behavior

Build error

Steps to reproduce

Additional information

What does the patch do?

It performs the following two simple steps:

  • Enable MBEDTLS_ECDSA_SIGN_ALT in mbedtls_config.h
  • Add -Wmissing-prototypes WARNING_CFLAGS flag in the Makefile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomponent-cryptoCrypto primitives and low-level interfacessize-xsEstimated task size: extra small (a few hours at most)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions