Skip to content

absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value #7

Open

Description

@ryandesign

Building the latest git code on macOS 12, I get these warnings:

include/vpb/Source:595:43: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]
                float closestResolution = fabsf(composite._sourceList[0]->getSortValue()-_targetResolution);
                                          ^
include/vpb/Source:595:43: note: use function 'std::abs' instead
                float closestResolution = fabsf(composite._sourceList[0]->getSortValue()-_targetResolution);
                                          ^~~~~
                                          std::abs
include/vpb/Source:598:35: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]
                    float delta = fabsf(composite._sourceList[i]->getSortValue()-_targetResolution);
                                  ^
include/vpb/Source:598:35: note: use function 'std::abs' instead
                    float delta = fabsf(composite._sourceList[i]->getSortValue()-_targetResolution);
                                  ^~~~~
                                  std::abs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions