- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: acc compile warning
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
03-14-2002 12:56 PM
03-14-2002 12:56 PM
acc compile warning
We upgrate HP-UX 10.2 to HP-UX 11i, the C complie upgrate from HP C++ to HP aC++, Oracle from 8i to 9i.
When I compile the program, I got the some warnings like following(the source files are X.cpp and Y.pc):
Warning 749: "X.cpp", line 90 # The cast from '_XDisplay *' to '{unnamed.struct.#99} [in file "X.cpp"] *' is performed as a 'reinterpret_cast'. This operation is non-portable and potentially unsafe.
UxScreen = DefaultScreen(UxDisplay);
^^^^^^^^^^^^^
Warning 829: "Y.cpp", line 1711 # Implicit conversion of string literal to 'char *' is deprecated.
"declare pl_msg VARCHAR2 ( 2000 ) ; pl_id VARCHAR2 ( 100 ) ; CUR
The code in X.cpp regarding to above warning is like this:
Display *UxDisplay;
int UxScreen;
UxDisplay = XtOpenDisplay(...);
UxScreen = DefaultScreen(UxDisplay);
I use PL/SQL in Y.pc, the Y.cpp file is compiled from Y.pc.
Would you please tell me how to fix it or leave them along?
Thanks,
Wendy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 01:08 PM
03-14-2002 01:08 PM
Re: acc compile warning
ProC is rather notorious for generating fairly loose code but in almost all cases the code is safe just not very strictly type-cast.
If all you see are warnings, you can add this compiler argument to your makefiles
+W747,829 ... to suppress the warning messages for warnings 747 and 829.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 01:34 PM
03-14-2002 01:34 PM
Re: acc compile warning
Do you think "Display" warning is not a problem too?
Thanks,
Wendy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 03:33 PM
03-14-2002 03:33 PM
Re: acc compile warning
Without digging into your code, I can't tell but clearly what is is telling you is that
UxScreen = DefaultScreen(UxDisplay) is questionable. You may simply need to make an extern declaration something like
extern int DefaultScreen(some_struct *UxDisplay);
or change the declaration of UxScreen to
match the type of DefaultScreen.
These are examples; only your header files know for sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 05:00 PM
03-14-2002 05:00 PM
Re: acc compile warning
The DefaultScreen is a macro, I find the definition in Xlib.h:
#define DefaultScreen(spy) (((_XPrivDisplay)dpy)->default_screen)
I tried this before:
Display *UxDisplay;
int UxScreen;
_XPrivDisplay xptr;
UxDisplay = XtOpenDisplay(...);
xptr = (_XPrivDisplay)UxDisplay;
UxScreen = xptr->default_screen;
But I got the similar error message.
Thanks,
Wendy