Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #8 from measurement-kit/fix/mk_build_warnings
Browse files Browse the repository at this point in the history
Fix warnings when building MK
  • Loading branch information
bassosimone committed Feb 5, 2019
2 parents db6dc85 + 09d8a7e commit b4cdebe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/Modules
Submodule Modules updated 1 files
+11 −11 MkUtils.cmake
4 changes: 2 additions & 2 deletions mkmmdb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ static bool MMDB_get_value_check(

// MKMMDB_ABORT allows to check in unit tests that we would abort.
#ifndef MKMMDB_ABORT
#define MKMMDB_ABORT abort()
#define MKMMDB_ABORT() abort()
#endif

// MKMMDB_ABORT_IF_NULLPTR calls abort if @p Pointer is nullptr.
#define MKMMDB_ABORT_IF_NULLPTR(Pointer) \
do { \
if (Pointer == nullptr) { \
MKMMDB_ABORT; \
MKMMDB_ABORT(); \
} \
} while (0)

Expand Down
2 changes: 1 addition & 1 deletion tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MKMOCK_DEFINE_HOOK(finish_lookup_asn_check, bool);
MKMOCK_DEFINE_HOOK(finish_lookup_org_check, bool);

// Override MKMMDB_ABORT so we can actually verify we would abort
#define MKMMDB_ABORT throw std::exception()
#define MKMMDB_ABORT() throw std::exception()

// Disable noexcept specifier for functions that may MKMMDB_ABORT
#define MKMMDB_NOEXCEPT // Nothing
Expand Down

0 comments on commit b4cdebe

Please sign in to comment.