<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic acc compile warning in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683681#M723258</link>
    <description>Hi,&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;When I compile the program, I got the some warnings like following(the source files are X.cpp and Y.pc):&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;        UxScreen = DefaultScreen(UxDisplay);&lt;BR /&gt;                   ^^^^^^^^^^^^^            &lt;BR /&gt;&lt;BR /&gt;Warning 829: "Y.cpp", line 1711 # Implicit conversion of string literal to 'char *' is deprecated.&lt;BR /&gt;          "declare pl_msg VARCHAR2 ( 2000 ) ; pl_id VARCHAR2 ( 100 ) ; CUR&lt;BR /&gt;&lt;BR /&gt;The code in X.cpp regarding to above warning is like this:&lt;BR /&gt;&lt;BR /&gt;Display *UxDisplay;&lt;BR /&gt;int     UxScreen;&lt;BR /&gt;&lt;BR /&gt;UxDisplay = XtOpenDisplay(...);&lt;BR /&gt;UxScreen = DefaultScreen(UxDisplay);&lt;BR /&gt;&lt;BR /&gt;I use PL/SQL in Y.pc, the Y.cpp file is compiled from Y.pc.&lt;BR /&gt;&lt;BR /&gt;Would you please tell me how to fix it or leave them along?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Wendy</description>
    <pubDate>Thu, 14 Mar 2002 20:56:31 GMT</pubDate>
    <dc:creator>Wendy_4</dc:creator>
    <dc:date>2002-03-14T20:56:31Z</dc:date>
    <item>
      <title>acc compile warning</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683681#M723258</link>
      <description>Hi,&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;When I compile the program, I got the some warnings like following(the source files are X.cpp and Y.pc):&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;        UxScreen = DefaultScreen(UxDisplay);&lt;BR /&gt;                   ^^^^^^^^^^^^^            &lt;BR /&gt;&lt;BR /&gt;Warning 829: "Y.cpp", line 1711 # Implicit conversion of string literal to 'char *' is deprecated.&lt;BR /&gt;          "declare pl_msg VARCHAR2 ( 2000 ) ; pl_id VARCHAR2 ( 100 ) ; CUR&lt;BR /&gt;&lt;BR /&gt;The code in X.cpp regarding to above warning is like this:&lt;BR /&gt;&lt;BR /&gt;Display *UxDisplay;&lt;BR /&gt;int     UxScreen;&lt;BR /&gt;&lt;BR /&gt;UxDisplay = XtOpenDisplay(...);&lt;BR /&gt;UxScreen = DefaultScreen(UxDisplay);&lt;BR /&gt;&lt;BR /&gt;I use PL/SQL in Y.pc, the Y.cpp file is compiled from Y.pc.&lt;BR /&gt;&lt;BR /&gt;Would you please tell me how to fix it or leave them along?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Wendy</description>
      <pubDate>Thu, 14 Mar 2002 20:56:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683681#M723258</guid>
      <dc:creator>Wendy_4</dc:creator>
      <dc:date>2002-03-14T20:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: acc compile warning</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683682#M723259</link>
      <description>Hi Wendy,&lt;BR /&gt;&lt;BR /&gt;ProC is rather notorious for generating fairly loose code but in almost all cases the code is safe just not very strictly type-cast.&lt;BR /&gt;&lt;BR /&gt;If all you see are warnings, you can add this compiler argument to your makefiles&lt;BR /&gt;+W747,829 ... to suppress the warning messages for warnings 747 and 829.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Thu, 14 Mar 2002 21:08:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683682#M723259</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-03-14T21:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: acc compile warning</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683683#M723260</link>
      <description>Hi Clay,&lt;BR /&gt;&lt;BR /&gt;Do you think "Display" warning is not a problem too?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Wendy</description>
      <pubDate>Thu, 14 Mar 2002 21:34:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683683#M723260</guid>
      <dc:creator>Wendy_4</dc:creator>
      <dc:date>2002-03-14T21:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: acc compile warning</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683684#M723261</link>
      <description>Hi again:&lt;BR /&gt;&lt;BR /&gt;Without digging into your code, I can't tell but clearly what is is telling you is that&lt;BR /&gt;UxScreen = DefaultScreen(UxDisplay) is questionable. You may simply need to make an extern declaration something like&lt;BR /&gt;extern int DefaultScreen(some_struct *UxDisplay);&lt;BR /&gt;or change the declaration of UxScreen to&lt;BR /&gt;match the type of DefaultScreen.&lt;BR /&gt;&lt;BR /&gt;These are examples; only your header files know for sure.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 23:33:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683684#M723261</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-03-14T23:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: acc compile warning</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683685#M723262</link>
      <description>Hi Clay,&lt;BR /&gt;&lt;BR /&gt;The DefaultScreen is a macro, I find the definition in Xlib.h:&lt;BR /&gt;#define DefaultScreen(spy)   (((_XPrivDisplay)dpy)-&amp;gt;default_screen)&lt;BR /&gt;&lt;BR /&gt;I tried this before:&lt;BR /&gt;&lt;BR /&gt;Display *UxDisplay; &lt;BR /&gt;int UxScreen; &lt;BR /&gt;_XPrivDisplay xptr;&lt;BR /&gt;&lt;BR /&gt;UxDisplay = XtOpenDisplay(...); &lt;BR /&gt;xptr = (_XPrivDisplay)UxDisplay;&lt;BR /&gt;UxScreen = xptr-&amp;gt;default_screen; &lt;BR /&gt;&lt;BR /&gt;But I got the similar error message.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Wendy&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Mar 2002 01:00:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/acc-compile-warning/m-p/2683685#M723262</guid>
      <dc:creator>Wendy_4</dc:creator>
      <dc:date>2002-03-15T01:00:05Z</dc:date>
    </item>
  </channel>
</rss>

