Forum
Mute compiler warnings for included libraries - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Wishlist (https://www.boriel.com/forum/forumdisplay.php?fid=14)
+----- Forum: Library (https://www.boriel.com/forum/forumdisplay.php?fid=20)
+----- Thread: Mute compiler warnings for included libraries (/showthread.php?tid=1022)



Mute compiler warnings for included libraries - patters - 01-26-2021

Every time I compile I get a big wall of text of warnings about unused variables and functions in libraries that are included in my program (input.bas, attr.bas and its own includes, HRPrint.bas, fastTrig.bas). Could such warnings for libraries be muted by default perhaps and make them elective for library debugging, or at least allow me to exclude them in my build script? I didn't write these pieces of code, so I'm not interested in these warnings. However if I mute all warnings then I could miss an issue with my own code. Even with warnings enabled I have missed many genuine warnings because they were drowned out by the noise (variable unused is the classic one - when a name has been mistyped or the capitalisation is wrong somewhere in the listing).


RE: Mute compiler warnings for included libraries - boriel - 01-26-2021

This is also in WIP (Work In Progress) and it's expected to be released in 1.15. The solution will be to use
Code:
#pragma library

when defining a library file. I'll post here once it's implemented.