We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9440aec commit 9537faaCopy full SHA for 9537faa
Lumberjack/DDTTYLogger.m
@@ -1212,7 +1212,7 @@ - (void)logMessage:(DDLogMessage *)logMessage
1212
NSUInteger msgLen = [logMsg lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
1213
const BOOL useStack = msgLen < (1024 * 4);
1214
1215
- char msgStack[useStack ? (msgLen + 1) : 0];
+ char msgStack[useStack ? (msgLen + 1) : 1]; // Analyzer doesn't like zero-size array, hence the 1
1216
char *msg = useStack ? msgStack : (char *)malloc(msgLen + 1);
1217
1218
[logMsg getCString:msg maxLength:(msgLen + 1) encoding:NSUTF8StringEncoding];
0 commit comments