PB 3.0.3 compiler - warning #2154: Unreachable code

hoborg

New member
Hi.

I just start to play with PB 3.0.3

I created simple package, add one dummy txt file to compres and add one custom action to initialization - Exit package.

Whe i try to compile it, i got a lot of “warning #2154” messages. Is that normal?
Code:
Compilation Log
Paquet Builder 3.0.3  

Package Summary:
Description: My archive
EXE Format: 32-bit EXE (x86)
Type of package: Package for general file distribution - IDStandard
Author: HOBRing
Date/Time: 20.8.2013 8:30:52  

Checking Settings
Listing files to be compressed...
Analysing user settings...
- Selected unpacking engine: Small
Output Directory: C:\TEST
Settings checked; the compilation can continue.  

Building Package Stub
Writing resource string table...
- Adding English language.
Writing file properties table...
Managing dialog boxes...
Compiling scripts:
 - script: "mainscript.c"...
C:\TEST\bin\mainscript.c(94): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(96): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(97): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(98): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(99): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(100): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(102): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(103): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(104): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(105): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(64): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(109): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(110): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(112): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(113): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(114): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(115): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(116): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(117): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(118): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(119): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(121): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(122): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(123): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(124): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(126): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(129): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(132): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(133): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(135): warning #2154: Unreachable code.
C:\TEST\bin\mainscript.c(136): warning #2154: Unreachable code.
Generating EXE resources...
Linking to build EXE stub...  

Compressing Files
Initializing compression routines...
Skipping file compression: the cached archive file is used since no changes were done to the file list.
Note: to force Paquet Builder to compress the files again, use the "Build Full Package" menu command in the "Build" menu, or press F10 instead of F9.  

Finalizing Package
- Generating internal resources for package...
- Compressing internal data...
- Merging data into the final EXE file...
Closing the package file and cleaning memory...  

Compilation Finished
Paquet Builder has successfully compiled your package.
Package Path: C:\TEST\test.exe
Package Final Size: 138,4 KiB, 141702 byte(s).
 
Last edited:
It’s because you are using label and goto custom actions, and somehow you have “dead” code, which means it is never reached nor executed. The C compiler is able to detect that dead code and shows these warnings. It doesn’t mean your package won’t work, it’s just that you left custom actions that will never be executed.
 
Last edited:
gdgsupport said:
It’s because you are using label and goto custom actions, and somehow you have “dead” code, which means it is never reached nor executed. The C compiler is able to detect that dead code and shows these warnings. It doesn’t mean your package won’t work, it’s just that you left custom actions that will never be executed.
Thanks for answer.

But as i wrote - i only added Exit to custom action - no labels/goto actions.
Look on attachement.
 
Last edited:
If you have custom actions after the Exit that are never called or executed, you’ll get the same warnings.
 
Last edited:
Back
Top