Date: Thu, 19 Aug 1999 18:37:41 +0700 (NSS) From: Max Khon <fjoe@iclub.nsu.ru> To: A.Leidinger@WJPServer.CS.Uni-SB.de Cc: freebsd-current@FreeBSD.ORG Subject: Re: Bug with malloc_options Message-ID: <Pine.BSF.4.05.9908191835170.65432-100000@iclub.nsu.ru> In-Reply-To: <199908191039.MAA00975@work.net.local>
next in thread | previous in thread | raw e-mail | index | archive | help
hi, there! On Thu, 19 Aug 1999 A.Leidinger@WJPServer.CS.Uni-SB.de wrote: > -current from ~3 days ago. > > from malloc(3): > ---snip--- > To specify in the source that a program does no return value checking on > calls to these functions: > > extern char *malloc_options; > malloc_options = "X"; > ---snip--- > > my source: > ---snip--- > #include <sys/types.h> > #include <stdio.h> > #include <stdlib.h> /* malloc() */ > #include <stddef.h> /* offsetof(...) */ > #include <unistd.h> /* get?id() */ > #include <signal.h> > #include <errno.h> > > #if defined(__FreeBSD__) && defined(DEBUG) > extern char *malloc_options; /* Line 22 */ > malloc_options = "JX"; /* Line 23 */ > #endif > ---snip--- > > The output of gcc: > ---snip--- > 23: warning: type defaults to `int' in declaration of `malloc_options' > 23: conflicting types for `malloc_options' > 22: previous declaration of `malloc_options' > 23: warning: initialization makes integer from pointer without a cast > 23: warning: data definition has no type or storage class > ---snip--- > > The output of gcc -E: > ---snip--- > extern char *malloc_options; > malloc_options = "JX"; > ---snip--- > > Should I go to bed or is this a bug in FreeBSD? first. 'malloc_options = "JX";' should be be within function body /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9908191835170.65432-100000>