- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HPUX C Compiler Warnings
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
Discussions
Discussions
Discussions
Forums
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
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
тАО12-13-2010 03:05 AM
тАО12-13-2010 03:05 AM
Does anyone know if there is there anyway I can turn off the C compiler warnings/remarks that come from a specfic line in a source file? I could use the -Wargx option but this would switch it off for the entire file.
Thanks
Solved! Go to Solution.
- Tags:
- suppress warnings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2010 03:47 AM
тАО12-13-2010 03:47 AM
SolutionFor example, to disable warning 2345 for a specific line or block of lines:
#pragma diag_suppress 2345
/* do your naughty thing here */
#pragma diag_default 2345
All #pragma directives are compiler-specific and non-portable.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2010 06:28 PM
тАО12-13-2010 06:28 PM
Re: HPUX C Compiler Warnings
That's +W####,####.
What particular warning do you want to suppress?
>Matti: then you can use the diag_suppress #pragma directive.
Yes, for Integrity you can use:
http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/Online_Help/pragmas.htm#Diagnostic
- Tags:
- suppress warnings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2010 06:59 AM
тАО12-14-2010 06:59 AM
Re: HPUX C Compiler Warnings
Using the #pragma works fine and will stop warnings where we know the code is safe - didn't like the idea of a blanket switch off.
Many thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2010 07:00 AM
тАО12-14-2010 07:00 AM
Re: HPUX C Compiler Warnings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2010 11:57 PM
тАО12-14-2010 11:57 PM
Re: HPUX C Compiler Warnings
You didn't want to fix the leak? :-)
It's small and only once?