OSDN Git Service

macOS: avoid unused variable warning when compiled with -DNDEBUG.
authorEric Branlund <ebranlund@fastmail.com>
Sat, 31 Jul 2021 04:25:02 +0000 (21:25 -0700)
committerEric Branlund <ebranlund@fastmail.com>
Sat, 31 Jul 2021 05:09:57 +0000 (22:09 -0700)
src/main-cocoa.m

index 338821d..0623721 100644 (file)
@@ -1203,6 +1203,7 @@ static int isCharNoPartial(const struct TerminalCell *c)
 
 - (void)assertInvariants
 {
+#ifndef NDEBUG
     const struct TerminalCell *cellsRow = self->cells;
 
     /*
@@ -1351,6 +1352,7 @@ static int isCharNoPartial(const struct TerminalCell *c)
        }
        cellsRow += self.columnCount;
     }
+#endif
 }
 
 + (wchar_t)getBlankChar