octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warnings when installing the control pkg


From: Markus Mützel
Subject: Re: warnings when installing the control pkg
Date: Thu, 10 Jan 2019 17:16:42 +0100

"Doug Stewart" wrote:
> I am seeing these new warnings.
> any suggestion on how to fix it will be muchly  appreciated.
> 
> 
> 
> common.cc:96:18: warning: format ‘%d’ expects argument of type ‘int’, but 
> argument 4 has type ‘octave_idx_type’ {aka ‘longint’} [-Wformat=]
> common.cc:96:18: warning: format ‘%d’ expects argument of type ‘int’, but 
> argument 5 has type ‘octave_idx_type’ {aka ‘longint’} [-Wformat=]
> common.cc:98:18: warning: format ‘%d’ expects argument of type ‘int’, but 
> argument 3 has type ‘octave_idx_type’ {aka ‘longint’} [-Wformat=]
>          warning ("%s: unknown warning, iwarn = %d", name, index);


In the core this was solved with this macro:

#if defined (OCTAVE_ENABLE_64)
#  define OCTAVE_IDX_TYPE_FORMAT PRId64
#else
#  define OCTAVE_IDX_TYPE_FORMAT PRId32
#endif


And later in the code:
warning ("%s: unknown warning, iwarn = %" OCTAVE_IDX_TYPE_FORMAT, name, index);


I don't know if any of OCTAVE_ENABLE_64 or OCTAVE_IDX_TYPE_FORMAT is part of 
the public API though.

Markus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]