> On 9 Jun 2022, at 4:33 PM, Mark Adams <[email protected]> wrote:
> 
> I rebased over master and now this branch fails source code check:
> 
> SETERRQ() with trailing newline ----------------------
> 1346 
> <https://gitlab.com/petsc/petsc/-/jobs/2569478894#L1346>src/ksp/pc/impls/amgx/amgx.cxx:169:
>       SETERRQ(amgx->comm, PETSC_ERR_LIB, "%s\n", msg); \
> 
> 
> Any idea how to best fix this?

That’s pretty self-explanatory: remove the trailing \n in your error message, 
i.e., "%s".

Thanks,
Pierre

> Thanks
> 
> // XXX Need to add call in AmgX API that gracefully destroys everything
> // without abort etc.
> #define PetscCallAmgX(rc) do { \
>   AMGX_RC err = (rc); \
>   char msg[4096]; \
>   switch (err) { \
>     case AMGX_RC_OK: \
>       break; \
>     default: \
>       AMGX_get_error_string(err, msg, 4096); \
>       SETERRQ(amgx->comm, PETSC_ERR_LIB, "%s\n", msg); \
>   } \
> } while (0)
> 
> 
> 

Reply via email to