* On 2021 17 Jan 12:08 -0600, Thomas Beierlein wrote: > 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.
I think the problem lies in the declaration of int_p in parse_logcfg.h, line 61 where its type is int and rig_model_t has a type of uint32_t. Perhaps adding another member to that union that is of type rig_model_t and reworking the other calls will solve this? 73, Nate -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Web: https://www.n0nb.us Projects: https://github.com/N0NB GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
signature.asc
Description: PGP signature