Date: Sun, 23 Aug 1998 13:38:28 +0200 From: Stefan Eggers <seggers@semyam.dinoco.de> To: Kris Kennaway <kkennawa@physics.adelaide.edu.au> Cc: Mike Smith <mike@smith.net.au>, freebsd-current@FreeBSD.ORG, seggers@semyam.dinoco.de Subject: lpr code cleanup? (was: Re: gcc 2.8 ) Message-ID: <199808231138.NAA06941@semyam.dinoco.de> In-Reply-To: Your message of "Sun, 23 Aug 1998 12:47:34 %2B0930." <Pine.OSF.3.90.980823123707.32254A-100000@mercury>
next in thread | previous in thread | raw e-mail | index | archive | help
> Unfortunately I'm not a very experienced C/C++ coder; I doubt I would have > the skills to identify how to fix these problems, but I'll see if I can > would be able to do better, though. lpr (one of the bits which fails due > to warnings being treated as errors) is probably an easy target for > someone who has a good understanding of C semantics and standards; there's [Just did an experiment by checking out the lpr module, adding an empty Makefile.inc on which it insisted in the parent directory and then doing "CC=egcc make" there. Egcc was from sometime in July.] It's easy to explain. Some parts of the code like lpr itself use the macro CWARNFLAGS which include -Werror changing all warnings to errors. Now egcs sees "register i" in lpr.c which isn't nice, issues a warning and then it makes a loud *boom*. The compilation failed. :-( While I looked at the code there I noticed other parts of the printing system like lpq don't use CWARNFLAGS and just add -Wall. Shall I try to correct this and get it compile w/o any warnings? In the case above a "register int i" won't hurt. It's even OK for K&R compilers so I think such a change would be a good thing. If so how shall I set the warning flags? Use the more complete CWARNFLAGS in all parts of the printing system or leave it as it is now? Stefan. -- Stefan Eggers Lu4 yao2 zhi1 ma3 li4, Max-Slevogt-Str. 1 ri4 jiu3 jian4 ren2 xin1. 51109 Koeln Federal Republic of Germany 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?199808231138.NAA06941>