Article View: comp.os.os2.programmer
Article #2102Problems with toolkit headers
From: Kenneth Porter
Date: Thu, 15 Oct 1992 23:18
Date: Thu, 15 Oct 1992 23:18
23 lines
1636 bytes
1636 bytes
I'm getting lots of spurious warnings while using the standard system header files. These mostly take the form of signed/unsigned errors when using constants. For example, the return value of most system calls has type unsigned, but bseerr.h defines all of its constants as signed (ie. there's no trailing "u" on the numbers). This requires a cast every time I compare a return value to a named constant to suppress the signed/unsigned warning. Why aren't there trailing U's on the numbers? Another problem occurs with the Dos Timer services, which use an event semaphore (HEV) but are prototyped as taking a non-specific semaphore (HSEM). Why not use HEV in the prototype? And how about adding a pragma to suppress warnings for specific unused parameters? I'm thinking of the Borland "pragma warn -par". For example, all window procedures must have the standard 4 arguments (hwnd,msg,mp1,mp2), but might not use all of them. This is an example of the general case of virtual functions (functions called through a pointer) in which not all candidate functions use all of the supplied arguments. Ken
Technical Details
Message-ID:
<Bw6rF8.34D@well.sf.ca.us>Path:
arc1-ca.pugleaf.net!sparky!uunet!kithrup!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!cbnewsd!att-out!pacbell.com!well!shivaShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!cbnewsd!att-out!pacbell.com!well!shiva From: shiva@well.sf.ca.us (Kenneth Porter) Subject: Problems with toolkit headers Message-ID: <Bw6rF8.34D@well.sf.ca.us> Sender: news@well.sf.ca.us Cc: cset2@vnet.ibm.com Organization: Whole Earth 'Lectronic Link Date: Thu, 15 Oct 1992 23:18:43 GMT Lines: 23