From: <no...@so...> - 2002-07-17 17:55:23
|
Patches item #582964, was opened at 2002-07-17 19:55 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=582964&group_id=2435 Category: w32api Group: None Status: Open Resolution: None Priority: 5 Submitted By: Gunnar Degnbol (gdegnbol) Assigned to: Nobody/Anonymous (nobody) Summary: Cast OLE error codes to longs Initial Comment: The OLE error codes are longs with high bit set. They are defined in winerror.h as #define CO_E_CLASS_CREATE_FAILED 0x80080001L The high bit makes g++ promote them to unsigned longs. When they are compared to a variable of type HRESULT (typedef of long) it then complains about signed/unsigned comparison (if -Wall). The patch changes all these defines to #define CO_E_CLASS_CREATE_FAILED ((long)(0x80080001L)) Microsoft does the same in their headers. The patch is made with this command: perl -e "while (<>) {s/ (0x8.*L)\$/ ((long)(\))/;print \sh }" \ < winerror.h > winerror.h.new ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=582964&group_id=2435 |