Am Sun, 17 Jan 2021 09:59:47 -0600
schrieb Nate Bargmann <n...@n0nb.us>:

> Is the pointer warning this one:
> 
> In file included from ../../tlf/src/parse_logcfg.c:46:
> ../../tlf/src/parse_logcfg.h:102:28: warning: pointer targets in
> initialization of ‘int *’ from ‘rig_model_t *’ {aka ‘unsigned int *’}
> differ in signedness [-Wpointer-sign] 102 |
> (cfg_arg_t){.int_p=&var, .min=minval, .max=maxval} |
>           ^ ../../tlf/src/parse_logcfg.c:1121:25: note: in expansion
> of macro ‘CFG_INT’ 1121 |     {"RIGMODEL",
> CFG_INT(myrig_model, 0, 9999)}, |                         ^~~~~~~
> ../../tlf/src/parse_logcfg.h:102:28: note: (near initialization for
> ‘(anonymous).<anonymous>.int_p’) 102 |
> (cfg_arg_t){.int_p=&var, .min=minval, .max=maxval} |
>           ^ ../../tlf/src/parse_logcfg.c:1121:25: note: in expansion
> of macro ‘CFG_INT’ 1121 |     {"RIGMODEL",
> CFG_INT(myrig_model, 0, 9999)}, |                         ^~~~~~~
> 
Right. That is the one in question.

> I was looking that over last night and is it a case that the macro and
> function need to be duplicated for the unsigned int?

I am not sure. I had a look into the definition of rig_model_t (the
type of myrig_model). As far as I could tell it is typedef'd to an int. 
But then I do not understand the warning. Seem I must look a little bit
more thoroughly.

> > Anyhow it would be good to get rid of them.  
> 
> Yeah, it makes it a bit more difficult to find the warnings and errors
> when trying to break things intentionally!
> 
Then just stay away from that evil doing :-).

73, de Tom



-- 
"Do what is needful!"
Ursula LeGuin: Earthsea
--

Attachment: pgp39ajO7tksT.pgp
Description: Digitale Signatur von OpenPGP

Reply via email to