Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing analyzer warning. Fixes issue #40

  • Loading branch information...
commit 9537faaaec752d6aa319a88853fa9cfcc7e03d3a 1 parent 9440aec
@robbiehanson robbiehanson authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Lumberjack/DDTTYLogger.m
View
2  Lumberjack/DDTTYLogger.m
@@ -1212,7 +1212,7 @@ - (void)logMessage:(DDLogMessage *)logMessage
NSUInteger msgLen = [logMsg lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
const BOOL useStack = msgLen < (1024 * 4);
- char msgStack[useStack ? (msgLen + 1) : 0];
+ char msgStack[useStack ? (msgLen + 1) : 1]; // Analyzer doesn't like zero-size array, hence the 1
char *msg = useStack ? msgStack : (char *)malloc(msgLen + 1);
[logMsg getCString:msg maxLength:(msgLen + 1) encoding:NSUTF8StringEncoding];
Please sign in to comment.
Something went wrong with that request. Please try again.