1 Clean Code Best Practices
2 =========================
4 This document describes some of the practices we use to maintain high code
7 Debug-only build variables
8 --------------------------
10 If you have any variables that are used only in a debug build, don't leave
11 them unused outside of debug builds.
13 The following is *bad* because it leaves an unused variable, which forces
14 the entire build to use `-Wno-unused-variable`:
33 To solve it, make the definition of `foo` part of the `#ifdef` or in this
34 case eliminate it completely and check the return value of `checkarg`
41 if (checkarg(arg) != 42)