English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 28 April 2019, 10:36   #1
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
vasm treat warnings as errors?

Is there a way to make vasm return an exit code != 0 if it encounters a warning? The equivalent of /WX or -Werror C compiler options.

I've just discovered the very helpful -warncomm option, which catches a lot of errors in my code due to habitual use of spaces in expressions. I'd like the build to fail if warncomm fires.

Code:
vasmm68k_mot_x64.exe -kick1hunks -Fhunkexe -I..\NDK_3.9\Include\include_i -I..\include -o blitter-copy.exe -no-opt -warncomm blitter-copy.asm

vasm 1.8e (c) in 2002-2018 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.3c (c) 2002-2018 Frank Wille
vasm motorola syntax module 3.12 (c) 2002-2018 Frank Wille
vasm hunk format output module 2.9c (c) 2002-2018 Frank Wille

warning 1019 in line 130 of "blitter-copy.asm": check comment
>PLAYFIELD_WIDTH_BYTES        EQU   PLAYFIELD_WIDTH_PIXELS / 8

code(acrx2):             900 bytes
bss(aurw1):               28 bytes
data_c(adrw2):           248 bytes
bss_c(aurw4):          86016 bytes

echo %errorlevel%
0
Note: I've modified the included NDK .i files, changing a load of * style comments to ; style to allow -warncomm to be used.
hop is offline  
Old 29 April 2019, 14:14   #2
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Good idea. Done. Please check tomorrow's source snapshot.
The new option -wfail makes vasm return with an error code also on warnings.
phx is offline  
Old 29 April 2019, 19:08   #3
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
Excellent, thanks! And thanks for the great tool.
hop is offline  
Old 30 April 2019, 22:32   #4
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
Works a treat thanks.

Code:
vasm 1.8f (c) in 2002-2019 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.3e (c) 2002-2019 Frank Wille
vasm motorola syntax module 3.12b (c) 2002-2019 Frank Wille
vasm hunk format output module 2.10 (c) 2002-2019 Frank Wille

warning 1019 in line 176 of "blitter-clear.asm": check comment
>PLAYFIELD_WIDTH_BYTES    EQU   PLAYFIELD_WIDTH_PIXELS / 8

code(acrx2):             866 bytes
bss(aurw1):               28 bytes
bss_c(aurw4):          86016 bytes

echo %errorlevel%
1
hop is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How not to treat your fan-base: Nintendo vs Sega wizard Retrogaming General Discussion 40 21 July 2016 21:07
Warnings after uploading in The Zone! eLowar project.EAB 12 12 October 2007 23:10
[found] -> Trick or Treat (was: 2 wizards fighting) wlcina Looking for a game name ? 2 19 January 2005 07:21
Trick Or Treat Remake - Work in Progress ant512 Amiga scene 15 16 November 2004 17:25
A novelty emulation treat MethodGit Retrogaming General Discussion 8 07 December 2001 18:29

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:04.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10489 seconds with 13 queries