TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Gary Chambers
from: Mario Semo
date: 1996-02-09 11:54:24
subject: Code not reachable...

Hello Gary,

On Feb 04 22:17 96, Gary Chambers of 1:326/426 wrote:

 GC> Can anyone explain why I get a "Code not reachable in 
 GC> function xxx" warning when compiling WinCheckMenuItem?  
 GC> It's used in the following manner:

I've tried your code in the following form without any problem. try to
write a reproducable testcase. Also you didn't mention your compiler,
CSDs,....

VACPP CTC1 CTO1

===== x.cpp ========
#define INCL_WIN
#include 

#define GEOD_METERS 0x1234
#define GEOD_FEET   0x1235

extern HWND hwndMenu;


MRESULT EXPENTRY wpClient (HWND hwnd,ULONG  msg ,MPARAM mp1 ,MPARAM mp2 )
{
 USHORT usMeasure=0;
 BOOL   bFeet;

 switch (msg)
   {
    case GEOD_METERS:
    case GEOD_FEET:
      WinCheckMenuItem(hwndMenu, usMeasure, FALSE);
      usMeasure = LOUSHORT(mp1);
      WinCheckMenuItem(hwndMenu, LOUSHORT(mp1), TRUE);
      bFeet = (LOUSHORT(mp1) == GEOD_FEET);
      WinInvalidateRect(hwnd, NULL, FALSE);
      return 0;
   }
 return 0;
}
==================


icc -Fd+ -Sm -Ss+ -Si+ -Tl30 -Q+
    -Wall+cls-gnr-lan-par-ppt-vft-inl-ppc-use- -W3 -C+
    -Gf+ -O+ -Gi+ x.cpp

 WARPED!, Mario

--- Msgedsq/2 2.2e
* Origin: LC/32 Development Team-Vienna-Austria (2:310/14.11)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 310/14 1 24/999 2/777 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.