Ah thanks Woody, that makes sense. Prior to this it had been a long time since I'd done any C, guess I should reread some of my C books more closely!
Thanks for the help, iain On Wed, May 20, 2020 at 4:03 AM Woody Douglass < [email protected]> wrote: > Iain, > > Try this: > > t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer s7_obj, t_atom > *atom){ > if( s7_is_boolean(s7_obj) ){ > atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); > } > > s7_pointer is already a pointer, it doesn't need to be `s7_pointer *obj` > in the signature. > > > On 2020-05-19 22:22:17-04:00 [email protected] wrote: > > Hi Bill and others, I'm trying to clean up the torrent of warnings my > project is producing in Xcode now that it's pretty big, and this one has me > stumped. here's a snippet of working code: > > t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer *s7_obj, t_atom > *atom){ > > if( s7_is_boolean(s7_obj) ){ > > atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); > > } > > > I get the following warning for every use of s7_obj like the above: > > "Incompatible pointer types passing 's7_pointer *' (aka 'struct s7_cell > **') to parameter of type 's7_pointer' (aka 'struct s7_cell *'); > dereference with *" > > > If I try letting XCode "fix" it, the compiler things I should be using > *s7_obj, which of course crashes (had to try it in case I was totally > misunderstanding...) > > > Is there something I can do to not get this warning, or do I need to > figure out how to tell xcode to just shut up with that one? > > > thanks! > >
_______________________________________________ Cmdist mailing list [email protected] https://cm-mail.stanford.edu/mailman/listinfo/cmdist
