Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-10254

Compiler warning: fabs used for integer types

    Details

    • Type: Improvement
    • Status: Invalid
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw

      Description

      Compiling results with clang in this warning:

      src/image/ImagePca.cc:393:46: note: use function 'std::abs' instead
                              double const delta = ::fabs(*fptr - iptr.image());
                                                   ^~~~~~
                                                   std::abs
      

      The obvious fix is to use std::abs instead.

      Krzysztof Findeisen would it make any sense to fix this as part of your general afw cleanup?

        Attachments

          Issue Links

            Activity

            rowen Russell Owen created issue -
            Hide
            krzys Krzysztof Findeisen added a comment - - edited

            I had thought C++ compiler warnings (e.g., signed-unsigned comparisons) were out of scope of DM-4639. If they're not, you might want to clarify on that ticket.

            I'm also not clear on the scope of this ticket – are you asking to look up every use of fabs in afw and manually check that the arguments are floats, or is it just this one call site?

            Show
            krzys Krzysztof Findeisen added a comment - - edited I had thought C++ compiler warnings (e.g., signed-unsigned comparisons) were out of scope of DM-4639 . If they're not, you might want to clarify on that ticket. I'm also not clear on the scope of this ticket – are you asking to look up every use of fabs in afw and manually check that the arguments are floats, or is it just this one call site?
            Hide
            rowen Russell Owen added a comment -

            Krzysztof Findeisen The only warnings I saw about this were in that one file. That's the scope of this ticket. Feel free to not include the fix in your other work if you'd rather not. We can keep this a separate ticket.

            Show
            rowen Russell Owen added a comment - Krzysztof Findeisen The only warnings I saw about this were in that one file. That's the scope of this ticket. Feel free to not include the fix in your other work if you'd rather not. We can keep this a separate ticket.
            krzys Krzysztof Findeisen made changes -
            Field Original Value New Value
            Link This issue is child task of DM-10257 [ DM-10257 ]
            krzys Krzysztof Findeisen made changes -
            Resolution Done [ 10000 ]
            Status To Do [ 10001 ] Invalid [ 11005 ]
            Hide
            krzys Krzysztof Findeisen added a comment -

            Partial duplicate of DM-10257, issue fixed there.

            Show
            krzys Krzysztof Findeisen added a comment - Partial duplicate of DM-10257 , issue fixed there.

              People

              • Assignee:
                Unassigned
                Reporter:
                rowen Russell Owen
                Watchers:
                Krzysztof Findeisen, Russell Owen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel