Skip to content

(minor) Some functions missing prototypes #74

Closed
@fenugrec

Description

Compiling with -Werror=missing-prototypes (I have that set globally in a project), causes these:

gpibusb-firmware-arm/printf/src/printf/printf.c:483:8: error: no previous prototype for 'apply_scaling' [-Werror=missing-prototypes]
  483 | double apply_scaling(double num, struct scaling_factor normalization)
      |        ^~~~~~~~~~~~~
gpibusb-firmware-arm/printf/src/printf/printf.c:488:8: error: no previous prototype for 'unapply_scaling' [-Werror=missing-prototypes]
  488 | double unapply_scaling(double normalized, struct scaling_factor normalization)
      |        ^~~~~~~~~~~~~~~
gpibusb-firmware-arm/printf/src/printf/printf.c:493:23: error: no previous prototype for 'update_normalization' [-Werror=missing-prototypes]
  493 | struct scaling_factor update_normalization(struct scaling_factor sf, double extra_multiplicative_factor)
      |                       ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Perhaps those functions could be declared as static since (if I understand correctly) they're not meant to be used outside of printf.c ?

Metadata

Assignees

Labels

resolved-on-developA changeset fixing this issue has been commiutted to the development branchtask

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions