- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Pro*C Precompile Warnings in HPUX Itanium
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2008 03:20 PM
07-24-2008 03:20 PM
Pro*C Precompile Warnings in HPUX Itanium
I migrated from HP-UX versión 11.11 RICS to HP-UX versión 11.31 Itanium.
The Proc un 11.11 RICS Compile fine, but when recompiling in 11.31 Itanium generate warnings such a :
- warning #2951-D: return type of function "main" must be "int"
- warning #2181-D: argument is incompatible with corresponding format string conversion
etc
Help me please how to solve the problem.
Thanks
Mnauel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2008 01:25 AM
07-25-2008 01:25 AM
Re: Pro*C Precompile Warnings in HPUX Itanium
The format error means you have the wrong format for that argument.
To help you any more, we would need to see the exact warning and the source in question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2008 06:25 AM
07-25-2008 06:25 AM
Re: Pro*C Precompile Warnings in HPUX Itanium
Ok, thanks for replay.
the question is because in HP-UX versión 11.11 RICS the programs .pc compile well without warnings, whereas in the HP-UX versión 11.31 Itanium the same programs generate warnings ..?
is It some flag of compiled ..?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2008 06:36 AM
07-25-2008 06:36 AM
Re: Pro*C Precompile Warnings in HPUX Itanium
This is a example the .pc :
#include
#include
#include
#include
#include
void main( argc, argv )
int argc;
char **argv;
{
if( argc != 3 ) {
FinAnormal(0);
}
if( !ValidarUsuario( argv[2] ) ) {
FinAnormal(1);
}
ProcesarArchivo( argv[1] );
}
void FinAnormal( CodigoError )
int CodigoError;
{
fprintf( stderr, "%s\n", ListaErrores[CodigoError] );
exit( CodigoError );
}
In 11.11 RISC the .C is generated without warnings
In 11.31 Itanium the .C is generated with warnings
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2008 08:21 AM
07-25-2008 08:21 AM
Re: Pro*C Precompile Warnings in HPUX Itanium
You're using two different compilers, and one
is newer/better/more helpful.
> warning #2951-D: return type of function
> "main" must be "int"
> void main( argc, argv )
That seems pretty clear to me.
> warning #2181-D: argument is incompatible
> with corresponding format string conversion
> etc
Not knowing which line is involved, I'll
assume this one:
> fprintf( stderr, "%s\n", ListaErrores[CodigoError] );
I don't see a declaration of ListaErrores[].
Is it "char *" (to agree with "%s")?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2008 08:43 AM
07-25-2008 08:43 AM
Re: Pro*C Precompile Warnings in HPUX Itanium
Clearly in this case the compiler you are using on 11.31 (BTW, you should specify the compiler version, not the OS version) cares about things the compiler version you are using on the system running 11.11 does not. Perhaps the compiler on 11.11 adheres to a looser/older C standard.
You should solve the problem by fixing your source code. I suspect you will find it still compiles without incident with the compiler you use on 11.11. Don't try to paper-over the warnings with compiler options even if you find some. At least that is my personal suggestion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2008 03:23 PM
07-25-2008 03:23 PM
Re: Pro*C Precompile Warnings in HPUX Itanium
Because aCC6 is much better (and stricter) than the PA compiler. It also includes +wlint.
>void main(argc, argv) int argc; char **argv;
This is garbage K&R style code. Also the Standard requires main to return an int.
>fprintf(stderr, "%s\n", ListaErrores[CodigoError]);
What is the type of ListaErrores? Is it a char[]? A char*?
>Rick: Perhaps the compiler on 11.11 adheres to a looser/older C standard.
They are probably both C89 but aCC6 is just better at flagging errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2008 01:56 PM
07-29-2008 01:56 PM
Re: Pro*C Precompile Warnings in HPUX Itanium
I understand that the new version is more strict that the previous version and the solution is to check the code to solve it.
The problem is the .C are many programas and to solve each one would spend a lot of time.
I might restore Compiler C of RISC version and use it in Itanium ..?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2008 02:33 PM
07-29-2008 02:33 PM
Re: Pro*C Precompile Warnings in HPUX Itanium
> and use it in Itanium ..?
Right. Good one.
Or, if you were serious, I seriously doubt it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2008 02:58 PM
07-29-2008 02:58 PM
Re: Pro*C Precompile Warnings in HPUX Itanium
The compiler you are running on the 11.11 system only generates PA-RISC code. While the Aries emulator will run that code on the Itanium systems, you are better off running "native" Itanium code. For that reason, bringing the compiler you are using on the 11.11 system onto the 11.31 Itanium system is really not a good idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2008 03:37 PM
07-29-2008 03:37 PM
Re: Pro*C Precompile Warnings in HPUX Itanium
To Rick's sound advice, I'll add a question for you: What will you do when a later compiler version doesn't compile your old code at all? Won't you wish that you had taken the time to address the *warnings* that have now become outright *errors*? You see, the issue will resurface and at a time when you have less time than now to rectify it. That's a universal law :-)
Of course, you could hope that all this will simply become someone else's problem.
Regards!
...JRF...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2008 06:16 PM
07-29-2008 06:16 PM
Re: Pro*C Precompile Warnings in HPUX Itanium
>The problem is the .C are many programs and to solve each one would spend a lot of time.
If you don't want to fix them now, you can just ignore the warnings until you have some time to fix them.
You can also use HP Code Advisor to get a prioritized list of the warnings so you know which to work on first:
$ cadvise report logfiles ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2008 06:53 PM
07-29-2008 06:53 PM
Re: Pro*C Precompile Warnings in HPUX Itanium
> and to solve each one would spend a lot of
> time.
Writing good, clean code is such a bother.
This fact helps to explain the abundance of
bad code in the world.