Resolving ANSI C warnings ! 
Author Message
 Resolving ANSI C warnings !

Hi,
    We are porting a legacy C application on HP UX to ANSI C and are
getting a lot of ANSI C warnings [ like prototype declarations, pointer
assignment ...]  while doing so. I would like to know if there are any
tools that could resolve these warnings.

Thanks in Advance

Regards

Kiran
--



Wed, 20 Nov 2002 03:00:00 GMT  
 Resolving ANSI C warnings !

Quote:

> Hi,
>     We are porting a legacy C application on HP UX to ANSI C and are
> getting a lot of ANSI C warnings [ like prototype declarations, pointer
> assignment ...]  while doing so. I would like to know if there are any
> tools that could resolve these warnings.

A good start is protoize.  All the illegal pointer references will need to be
fixed by hand.  There is a reason we can demand actual money for porting
legacy code.

Quote:

> Thanks in Advance

> Regards

> Kiran
> --


--

What one knows is, in youth, of little moment; they know enough who
know how to learn. - Henry Adams

A thick skin is a gift from God. - Konrad Adenauer
--



Thu, 21 Nov 2002 03:00:00 GMT  
 Resolving ANSI C warnings !

Quote:

>     We are porting a legacy C application on HP UX to ANSI C and are
> getting a lot of ANSI C warnings [ like prototype declarations,
> pointer
> assignment ...]  while doing so. I would like to know if there are any
> tools that could resolve these warnings.

What sort of tools are you looking for?  Just fix the problems.

--

 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Always forgive your enemies -- nothing annoys them so much.
\__/ Oscar Wilde
    Computer science / http://www.alcyone.com/max/reference/compsci/
 A computer science reference.
--



Thu, 21 Nov 2002 03:00:00 GMT  
 Resolving ANSI C warnings !

Quote:
> Hi,
>     We are porting a legacy C application on HP UX to ANSI C and are
> getting a lot of ANSI C warnings [ like prototype declarations, pointer
> assignment ...]  while doing so. I would like to know if there are any
> tools that could resolve these warnings.

Yepp, there is a tool called lex or flex, and if you really want warnings
resolved...
you should take a look at a tool called yacc.

Of course, the year is still 2000 and you living on a planet called Earth,
the above cannot be done without human interaction.

--
Tor
--



Thu, 21 Nov 2002 03:00:00 GMT  
 Resolving ANSI C warnings !
Each warning message is caused by an a legacy (HPUX CC) idiom
that is not techically correct by ANSI standards.   For each such
idiom, you can probably propose a straightforward fix
(missing prototype?  Add one, etc.).

If you have a small amount of code, you can do this manually at just some
inconvenience.
If you have a large amount of code (100K SLOC or more), this might be pretty
painful.

Or you can get a tool to automate this.   The DMS Reengineering Toolkit
is designed to carry out such mass regular changes.
It (compiler) parses C source, builds compiler data structures,
can carry out transformations on those structures, and
then can spit out the revised result in a nicely beautified form.
See http://www.semdesigns.com/Products/DMS/DMSToolkit.html.

--

Semantic Designs, Inc., www.semdesigns.com FAX 512-250-1191
12636 Research Blvd #C214, Austin, Texas 78759



Quote:
> Hi,
>     We are porting a legacy C application on HP UX to ANSI C and are
> getting a lot of ANSI C warnings [ like prototype declarations, pointer
> assignment ...]  while doing so. I would like to know if there are any
> tools that could resolve these warnings.

--



Thu, 21 Nov 2002 03:00:00 GMT  
 Resolving ANSI C warnings !


Quote:
>Hi,
>    We are porting a legacy C application on HP UX to ANSI C and are
>getting a lot of ANSI C warnings [ like prototype declarations, pointer
>assignment ...]  while doing so. I would like to know if there are any
>tools that could resolve these warnings.

Define "resolve".

Do you mean "make go away" (which usually means something like "pipe the
ones that don't matter to /dev/null") ?

Or do you mean "Cleanse the source" so that there will be no warnings?

Or do you mean "Fix the source" so that there will be no problems?

Note that the last 2 are subtly different.
--



Thu, 21 Nov 2002 03:00:00 GMT  
 Resolving ANSI C warnings !

Quote:
>     We are porting a legacy C application on HP UX to ANSI C and are
> getting a lot of ANSI C warnings [ like prototype declarations, pointer
> assignment ...]  while doing so. I would like to know if there are any
> tools that could resolve these warnings.

Something like cproto may help you handle the prototypes to a large
extent.

--

--



Thu, 21 Nov 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Resolving ANSI C warnings !

2. Trying to resolve linker warning...

3. Newbie: separate big .cs file into small .cs files

4. Xlib compilation warnings with ANSI c

5. Help, DOS Borland Compiler Warning -- ANSI Peek Function

6. Warning when using *getenv with ANSI-C compiler

7. Ansi warning from a line of code. (Help)

8. Shut up this warning (ANSI behaviour?)

9. ANSI C NULL with cast as a function arg generates lint warning

10. Warning when no warning due

11. Warning, Danger, Warning

12. Need help with annoying warning: LINK : warning LNK4199: /DELAYLOAD:mtxex.dll ignored

 

 
Powered by phpBB® Forum Software