Date: Fri, 8 Oct 2004 14:41:12 +0200 From: Stefan Farfeleder <stefan@fafoe.narf.at> To: Andreas Klemm <andreas@klemm.apsfilter.org> Cc: "Jonathan A. Zdziarski" <jonathan@nuclearelephant.com> Subject: Re: please help with: warning: initialization makes integer from pointer Message-ID: <20041008124108.GA59642@wombat.fafoe.narf.at> In-Reply-To: <20041007174322.GB3414@titan.klemm.apsfilter.org> References: <20041005054213.GA11770@lesanti.hq.sinectis.com.ar> <416234B1.8020406@nuclearelephant.com> <20041005202816.GA14973@titan.klemm.apsfilter.org> <20041005205040.GH31397@lesanti.hq.sinectis.com.ar> <20041006060437.GA23364@titan.klemm.apsfilter.org> <20041006144220.GA29653@lesanti.hq.sinectis.com.ar> <20041007111139.GA16296@titan.klemm.apsfilter.org> <416579E1.8050308@nuclearelephant.com> <20041007174322.GB3414@titan.klemm.apsfilter.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 07, 2004 at 07:43:22PM +0200, Andreas Klemm wrote: > Dear FreeBSD hackers, > > could somebody please help Jonathan, the dspam owner, how to code > this best under FreeBSD ? > s->p_getpwnam = (struct passwd) { NULL, NULL, 0, 0, NULL, NULL, NULL }; > ^^^^^^^^^^^^^^^^^^^^ ! > s->p_getpwuid = (struct passwd) { NULL, NULL, 0, 0, NULL, NULL, NULL }; > ^^^^^^^^^^^^^^^^^^^^ ! This works but might cause (harmless) warnings about missing initialisers: s->p_getpwnam = (struct passwd) { 0 }; s->p_getpwuid = (struct passwd) { 0 }; Alternatively: static struct passwd zero_pwd; s->p_getpwnam = zero_pwd; s->p_getpwuid = zero_pwd; Cheers, Stefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041008124108.GA59642>