Page MenuHomeFreeBSD

tests/sys/geom build warning fixes
ClosedPublic

Authored by aprieger_llnw.com on Jun 5 2017, 8:52 PM.

Details

Summary

tests/sys/geom build warning fixes

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

aprieger_llnw.com added a comment.EditedJun 5 2017, 8:56 PM

Changelog:
Pre-fix warnings are at: https://gist.github.com/aprieger-llnw/3fda4ad7d4d0e1a11f6625f796fe8a80

  1. sys/geom/eli/pkcs5v2.c
    • Warnings:
      • warning: passing 'const char *' to parameter of type 'const uint8_t *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
      • warning: passing 'uint8_t [11]' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    • Fixes:
      • added the explicit modifier "const uint8_t *" to parameter "passphrase" to prepare it for the function on line 72
      • added the explicit modifier "const char *" to parameter "passphrase" to prepare it for the function on line 103
sbruno requested changes to this revision.Jun 17 2017, 7:37 PM

Instead of casting to const char *, can you investigate actually changing and/or making the variable type consistent (either const char [] or const uint8_t [])?

This revision now requires changes to proceed.Jun 17 2017, 7:37 PM
aprieger_llnw.com edited edge metadata.
  • tests/sys/geom build warning fixes
  • tests/sys/geom revision update

    Needed to change the variable to const char [], because the change to uint8_t [] would need to cause strcmp to be changed
sbruno accepted this revision.May 8 2018, 8:42 PM
sbruno added reviewers: oshogbo, pjd.

Should be cosmetic and cleans up warnings only.

This revision is now accepted and ready to land.May 8 2018, 8:43 PM
oshogbo accepted this revision.May 9 2018, 7:03 AM
This revision was automatically updated to reflect the committed changes.