[liblouis-liblouisxml] Re: Compiler warnings in VC6 environment

  • From: "Neil Soiffer" <Neils@xxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Tue, 8 Jul 2008 13:23:50 -0700

I'm sure that if you up the warning level on gcc (if that is what you use),
you'll see them too.  gcc can be quite picky if you tell it to be.  I agree
with Jeff -- you should try to eliminate the warnings.  Almost all of them
indicate things that are not problems, but every now and then you'll look at
one and realize that it is a real problem (eg, an unsigned number that can
go negative in a loop that runs backwards to <= zero... but because it is
unsigned, never ends).

    Neil


On Tue, Jul 8, 2008 at 12:05 PM, Jeff Dittel <jeff@xxxxxxxxxxx> wrote:

>
> John,
>
> I don't know how specific it is to VC6, but VC6 is one of the most common
> compilers for the Windows platform, so we should get it to compile without
> all the warnings.  I modified the code such that I get no warnings and have
> attached a zip file with the 4 files I had to change.  Can you try dropping
> them into your Unix environment and see if the changes cause any problems?
>
> Thanks,
>
> Jeff
>
> Jeff Dittel, President
> ~~~~~~~~~~~~~~~~~~~~~~
> Britlan, Ltd.
> 516 East Birch Avenue
> Whitefish Bay, WI 53217
> jeff@xxxxxxxxxxx
> U.S. Office: (414)962-2281
> Costa Rica Office: (414)290-0574
>
>
>
> -----Original Message-----
> From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
> [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of John J.
> Boyer
> Sent: Tuesday, July 08, 2008 1:25 PM
> To: liblouis-liblouisxml@xxxxxxxxxxxxx
> Subject: [liblouis-liblouisxml] Re: Compiler warnings in VC6 environment
>
> Jeff,
>
> Messages to the list are coming through just fine.
>
> I'm wondering just how specific these warnings are to VC6. Nobody has
> mentioned them before. That is especially true of the pragma.
>
> John
>
> On Tue, Jul 08, 2008 at 08:57:13AM -0500, Jeff Dittel wrote:
> >
> > Hey John,
> >
> > When compiling in the VC6 environment I am getting over 100 warnings.  I
> was
> > wondering if you would do the following changes for the next release, so
> we
> > don't get these warnings:
> >
> > * At the top of LibLouis.h add the line:
> > #pragma warning( disable : 4114 )
> > Note: This warning is because you use the const like:
> > const char const * ...
> > which causes the warning:
> > same type qualifier used more than once
> >
> > * The following warnings are due to signed/unsigned mismatches and can be
> > fixed by casting:
> > lou_translatestring.c(156) : warning C4018: '<=' : signed/unsigned
> mismatch
> > lou_translatestring.c(691) : warning C4018: '<' : signed/unsigned
> mismatch
> > lou_translatestring.c(997) : warning C4018: '<' : signed/unsigned
> mismatch
> > lou_translatestring.c(1003) : warning C4018: '<' : signed/unsigned
> mismatch
> > lou_translatestring.c(1010) : warning C4018: '<' : signed/unsigned
> mismatch
> > lou_translatestring.c(1428) : warning C4018: '>' : signed/unsigned
> mismatch
> > lou_translatestring.c(1430) : warning C4018: '<' : signed/unsigned
> mismatch
> > readconfig.c(336) : warning C4018: '==' : signed/unsigned mismatch
> > readconfig.c(350) : warning C4018: '==' : signed/unsigned mismatch
> > transcriber.c(238) : warning C4018: '>=' : signed/unsigned mismatch
> > transcriber.c(272) : warning C4244: '=' : conversion from 'unsigned short
> '
> > to 'unsigned char ', possible loss of data
> >
> > * Here is three other warnings that need to be cleaned up:
> > paths.c(56) : warning C4047: 'function' : 'unsigned long ' differs in
> levels
> > of indirection from 'void *'
> > paths.c(56) : warning C4024: 'lpfnSHGetFolderPath' : different types for
> > formal and actual parameter 4
> > paths.c(99) : warning C4028: formal parameter 1 different from
> declaration
> >
> > Thanks very much,
> >
> > Jeff
> >
> >
> >
> > Jeff Dittel, President
> > ~~~~~~~~~~~~~~~~~~~~~~
> > Britlan, Ltd.
> > 516 East Birch Avenue
> > Whitefish Bay, WI 53217
> > jeff@xxxxxxxxxxx
> > U.S. Office: (414)962-2281
> > Costa Rica Office: (414)290-0574
> >
>
> --
> John J. boyer; President, Chief Software Developer
> JJB Software, Inc.
> http://www.jjb-software.com
> Madison, WI USA
> Developing software for people with disabilities
>
> For a description of the software and to download it go to
> http://www.jjb-software.com
>

Other related posts: