Fix some clang warnings

Former-commit-id: 3785b1efd49002e629c1d821c57e971f8f09a2d2
This commit is contained in:
John Sully 2020-04-16 20:12:05 -04:00
parent 3ecb621ccf
commit 0b9779c33f
3 changed files with 1 additions and 6 deletions

View File

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

View File

@ -84,4 +84,4 @@ struct fastlock
#endif
};
static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct");
static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct");

View File

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