Skip to content

Commit

Permalink
Patched minor compilation warning for NDEBUG-defined builds
Browse files Browse the repository at this point in the history
  • Loading branch information
username0x0a committed Nov 15, 2016
1 parent ef5b4b7 commit f7480d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fmdb/FMDatabaseQueue.m
Expand Up @@ -154,10 +154,12 @@ - (FMDatabase*)database {
}

- (void)inDatabase:(void (^)(FMDatabase *db))block {
#ifndef NDEBUG
/* Get the currently executing queue (which should probably be nil, but in theory could be another DB queue
* and then check it against self to make sure we're not about to deadlock. */
FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);
assert(currentSyncQueue != self && "inDatabase: was called reentrantly on the same queue, which would lead to a deadlock");
#endif

FMDBRetain(self);

Expand Down

0 comments on commit f7480d4

Please sign in to comment.