[Trilinos-Users] [12.2.1] Amesos2 suspicious waring in AMESOS2_SLUD_GET_EQUED

Denis Davydov davydden at gmail.com
Tue Sep 8 09:17:54 EDT 2015


Perhaps your define should be something like:

#define AMESOS2_SLUD_GET_EQUED(ds) (((ds)==SLUD::NOEQUIL) ? 'N' : ((ds)==SLUD::ROW) ? 'R' : ((ds)==SLUD::COL) ? 'C' : 'B’)

(called with SLUD::DiagScale_t* equed). 

If that is indeed the case, please add the patch to the 12.2 branch so that it’s fixed next time the release is updated for the public.
Otherwise I don’t see how can one compare an object of
   typedef enum {NOEQUIL, ROW, COL, BOTH}                          DiagScale_t;
to ‘C’. 

Regards,
Denis.

> On 6 Sep 2015, at 10:12, Denis Davydov <davydden at gmail.com> wrote:
> 
> Dear developers,
> 
> I have the following warning on Clang (AppleClang 6.1.0.6020053) which looks quite suspicious:
> 
> In file included from /usr/local/lib/cmake/Pike/../../../include/Amesos2_Superludist_decl.hpp:58:
> /usr/local/lib/cmake/Pike/../../../include/Amesos2_Superludist_FunctionMap.hpp:285:17: warning: comparison of constant 67 with expression of type 'SLUD::DiagScale_t' is always false [-Wtautological-constant-out-of-range-compare]
>      char eq = AMESOS2_SLUD_GET_EQUED(*equed);
>                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/cmake/Pike/../../../include/Amesos2_Superludist_FunctionMap.hpp:71:98: note: expanded from macro 'AMESOS2_SLUD_GET_EQUED'
> #define AMESOS2_SLUD_GET_EQUED(ds) (((ds)==SLUD::NOEQUIL) ? 'N' : ((ds)==SLUD::ROW) ? 'R' : ((ds)=='C') ? SLUD::COL : SLUD::BOTH)
>                                                                                                                                                                         ~~~~^ ~~~
> 
> Could you please check if the marco makes sense on all compilers and still holds for Superlu_Dist 4.1?
> 
> Kind regards,
> Denis 
> 



More information about the Trilinos-Users mailing list