]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Try fixing Windows build to work with ALL_BUGS_ARE_FATAL
authorrl1987 <rl1987@sdf.lonestar.org>
Sat, 14 Mar 2020 14:43:08 +0000 (16:43 +0200)
committerteor <teor@torproject.org>
Tue, 17 Mar 2020 11:08:10 +0000 (21:08 +1000)
src/feature/dircache/conscache.c

index ceba410a5f0faae4bec80931e8079450c2cff7de..d9aaccddc1233a1534c08058e58fb1776d8824cd 100644 (file)
@@ -132,6 +132,15 @@ consensus_cache_may_overallocate(consensus_cache_t *cache)
 #endif
 }
 
+// HACK: GCC on Appveyor hates that we may assert before returning. Work around
+// the error.
+#ifdef _WIN32
+#ifndef COCCI
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
+#endif
+#endif
+
 /**
  * Tell the sandbox (if any) configured by <b>cfg</b> to allow the
  * operations that <b>cache</b> will need.
@@ -156,6 +165,12 @@ consensus_cache_register_with_sandbox(consensus_cache_t *cache,
   return storage_dir_register_with_sandbox(cache->dir, cfg);
 }
 
+#ifdef _WIN32
+#ifndef COCCI
+#pragma GCC diagnostic pop
+#endif
+#endif
+
 /**
  * Helper: clear all entries from <b>cache</b> (but do not delete
  * any that aren't marked for removal