Path: utzoo!utgpu!cunews!bcars8!bnrgate!bwdls58!mlord From: mlord@bwdls58.bnr.ca (Mark Lord) Newsgroups: comp.os.msdos.apps Subject: Re: patch and GNU diff woes Message-ID: <3774@bwdls58.UUCP> Date: 12 Jul 90 19:25:44 GMT References: <27000@netnews.upenn.edu> Sender: mlord@bwdls58.UUCP Reply-To: mlord@bwdls58.bnr.ca (Mark Lord) Organization: Bell-Northern Research, Ottawa, Canada Lines: 35 In article <27000@netnews.upenn.edu> weisen@eniac.seas.upenn.edu (Neil Weisenfeld) writes: >Sorry that I haven't had time to look at the source code and ferret these >out myself, but here's the problem I had: Well.. I just generated an executable for my HPUX machine, and the compiler spotted an uninitialized local variable in one routine.. perhaps fixing it might cure some of these other ailments people are noticing. In file INP.C, there is a procedure called rev_in_string() at the bottom. This procedure declares a local variable "s", which is then used without first being given a value. This instance of "s" should be replaced with the parameter "string" instead on that one line. Ie. the existing line looks like: if (strnEQ(string,revision,patlen) && isspace(s[patlen])) and should be changed to look like if (strnEQ(string,revision,patlen) && isspace(string[patlen])) This is such an obvious bug, I wonder whether it was part of the REAL distribution of 'patch', or just something introduced here by a mis-applied patch or something. I've sent email to the author (lwall) asking about it. I got some other complaints about illegally mixing pointers and ints in expressions from the mypatch.dif file.. so beware of this when applying those patches. Ideally, turn on ALL error detection in TURBOC and then FIX every problem reported, even the "simple" warnings. -- ___Mark S. Lord__________________________________________ | ..uunet!bnrgate!bmerh614!mlord | Climb Free Or Die (NH) | | ..uunet!bnrgate!mlord%bmerh614 | Personal views only. | |________________________________|________________________|