Page MenuHomeFreeBSD

kerberos5/lib/libkrb5 some build warning fixes
Needs ReviewPublic

Authored by aprieger_llnw.com on Jun 5 2017, 5:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 2:08 AM
Unknown Object (File)
Jan 30 2024, 9:44 PM
Unknown Object (File)
Dec 22 2023, 10:52 PM
Unknown Object (File)
Dec 8 2023, 9:15 PM
Unknown Object (File)
Nov 18 2023, 5:00 AM
Unknown Object (File)
Nov 18 2023, 4:55 AM
Unknown Object (File)
Nov 18 2023, 4:38 AM
Unknown Object (File)
Nov 13 2023, 6:54 PM
Subscribers
None

Details

Reviewers
kbowling
sbruno
Summary

kerberos5/lib/libkrb5 build time warning fixes

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 9674
Build 10114: arc lint + arc unit

Event Timeline

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

  1. crypto/heimdal/lib/krb5/rd_cred.c
    • Warnings:
      • warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
    • Fixes:
      • changed the abs() function to labs() to handle the long argument on line 225
  2. crypto/heimdal/lib/krb5/rd_priv.c
    • Warnings:
      • warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
    • Fixes:
      • changed the abs() function to labs() to handle the long argument on line 139
  3. crypto/heimdal/lib/krb5/rd_req.c
    • Warnings:
      • warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
    • Fixes:
      • changed the abs() function to labs() to handle the long argument on line 444
  4. crypto/heimdal/lib/krb5/rd_safe.c
    • Warnings:
      • warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
    • Fixes:
      • changed the abs() function to labs() to handle the long argument on line 162
  5. crypto/heimdal/lib/krb5/ticket.c
    • Warnings:
      • warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
    • Fixes:
      • changed the abs() function to labs() to handle the long argument on lines 779 and 783

[Note: additional warnings upon building kerberos5/lib/libkrb5 warning: taking the absolute value of unsigned type 'LR_TYPE' (aka 'enum LR_TYPE') has no effect [-Wabsolute-value] in file crypto/heimdal/lib/krb5/init_creds_pw.c however, I found no solution without altering the structure of the code]