From 0b9779c33f0870c27f537530d623b53b7c4a3ff5 Mon Sep 17 00:00:00 2001 From: John Sully Date: Thu, 16 Apr 2020 20:12:05 -0400 Subject: [PATCH] Fix some clang warnings Former-commit-id: 3785b1efd49002e629c1d821c57e971f8f09a2d2 --- src/fastlock.cpp | 2 -- src/fastlock.h | 2 +- src/geohash_helper.cpp | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/fastlock.cpp b/src/fastlock.cpp index a1cacfecd..5a7152b00 100644 --- a/src/fastlock.cpp +++ b/src/fastlock.cpp @@ -140,13 +140,11 @@ extern "C" void unlock_futex(struct fastlock *lock, uint16_t ifutex); #endif -#pragma weak _serverPanic extern "C" __attribute__((weak)) void _serverPanic(const char * /*file*/, int /*line*/, const char * /*msg*/, ...) { *((char*)-1) = 'x'; } -#pragma weak serverLog __attribute__((weak)) void serverLog(int , const char *fmt, ...) { va_list args; diff --git a/src/fastlock.h b/src/fastlock.h index 44c09ac17..cdf8fe454 100644 --- a/src/fastlock.h +++ b/src/fastlock.h @@ -84,4 +84,4 @@ struct fastlock #endif }; -static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct"); \ No newline at end of file +static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct"); diff --git a/src/geohash_helper.cpp b/src/geohash_helper.cpp index e23f17b4e..cf9716352 100644 --- a/src/geohash_helper.cpp +++ b/src/geohash_helper.cpp @@ -46,13 +46,10 @@ #define ECCENT (sqrt(1.0 - (RATIO *RATIO))) #define COM (0.5 * ECCENT) -/// @brief The usual PI/180 constant -const double DEG_TO_RAD = 0.017453292519943295769236907684886; /// @brief Earth's quatratic mean radius for WGS-84 const double EARTH_RADIUS_IN_METERS = 6372797.560856; const double MERCATOR_MAX = 20037726.37; -const double MERCATOR_MIN = -20037726.37; static inline double deg_rad(double ang) { return ang * D_R; } static inline double rad_deg(double ang) { return ang / D_R; }