giaf / blasfeo

Basic linear algebra subroutines for embedded optimization
Other
322 stars 88 forks source link

warning: using integer absolute value function 'abs' when argument is of floating point type #131

Closed yurivict closed 4 years ago

yurivict commented 4 years ago
/usr/ports/math/blasfeo/work/blasfeo-0.1.2/examples/tools.c:412:10: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
                temp = abs(*(ptrA+j*row));
                       ^
/usr/ports/math/blasfeo/work/blasfeo-0.1.2/examples/tools.c:412:10: note: use function 'fabs' instead
                temp = abs(*(ptrA+j*row));
                       ^~~
                       fabs
/usr/ports/math/blasfeo/work/blasfeo-0.1.2/examples/tools.c:415:12: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
                        temp += abs(*(ptrA+j*row+i));
                                ^
/usr/ports/math/blasfeo/work/blasfeo-0.1.2/examples/tools.c:415:12: note: use function 'fabs' instead
                        temp += abs(*(ptrA+j*row+i));
                                ^~~
                                fabs
giaf commented 4 years ago

Thanks for reporting, fixed here https://github.com/giaf/blasfeo/commit/c64c1b574b2aaa9c95e44a46c25bbce385107308