Просмотр исходного кода

Merge pull request #551 from michalzelinka/master

Patched minor compilation warning for NDEBUG-defined builds
August "Gus" Mueller 9 лет назад
Родитель
Сommit
74d914e558
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      src/fmdb/FMDatabaseQueue.m

+ 2 - 0
src/fmdb/FMDatabaseQueue.m

@@ -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);