Mail Archives: djgpp/2011/09/26/16:22:53
Am Montag, 26. September 2011 schrieb Ozkan Sezer:
> On Mon, Sep 26, 2011 at 1:29 AM, Juan Manuel Guerrero
> <juan DOT guerrero AT gmx DOT de> wrote:
> > OFYI, I have produced a second version of the patch presented the last time.
> > This time the patch shall fix the same issues but for djdev 2.03.
> >
> > Suggestions, objections, comments are welcome.
> >
>
>
> Using gcc-4.4.7, I got two compilation errors, for both v2.03
> and for v2.04 versions of your patches:
[snip]
> > + �r.x.flags |= 1; �/* Always set CF before calling a 0x71NN function. */
>
> First was here:
>
> cc1: warnings being treated as errors
> In file included from lfnshort.c:8:
> ../../../../include/fcntl.h: In function '_lfn_gen_short_fname':
> lfnshort.c:25: error: 'r' is used uninitialized in this function
> lfnshort.c:22: note: 'r' was declared here
[snip]
> In file included from opendir.c:15:
> ../../../../include/dirent.h: In function '_lfn_find_close':
> opendir.c:46: error: 'r' is used uninitialized in this function
> opendir.c:44: note: 'r' was declared here
> make[3]: *** [opendir.o] Error 1
>
> In both cases directly setting flags to 1 instead of OR'ing, i.e.:
> r.x.flags = 1; /* Always set CF before calling a 0x71NN function. */
> ... cures the flag. Compiler is right, because r is not initialized
> and OR'ing a value to a member of it seems wrong. You need
> to audit other places like this in your patch.
Sorry but I cannot reproduce this. I have checked out the repository today and
compiled with gcc 4.6.1 and djdev204 using the patch presented in
<http://www.delorie.com/archives/browse.cgi?p=djgpp/2011/09/18/17:03:04> and it
compiles flawlessly. Neitherless, you are right. I will look for the places
where CF is set and check that the flags variable is correctly initilized.
Regards,
Juan M. Guerrero
- Raw text -