mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 21:05:26 +03:00
Silence CLangs warnings so -DWARNING_AS_ERROR does not break the build under OS X
This commit is contained in:
parent
96d9ae4776
commit
7f1dea6129
2 changed files with 10 additions and 2 deletions
|
@ -21,8 +21,11 @@
|
||||||
#ifndef _DEFINITIONS_H_
|
#ifndef _DEFINITIONS_H_
|
||||||
#define _DEFINITIONS_H_
|
#define _DEFINITIONS_H_
|
||||||
|
|
||||||
#if defined(SIMU)
|
#if defined(SIMU) && __GNUC__
|
||||||
#define __ALIGNED
|
#define __ALIGNED __attribute__((aligned(32)))
|
||||||
|
#define __SECTION_USED(s) __attribute__((used))
|
||||||
|
#elif defined(SIMU)
|
||||||
|
#define __ALIGNED
|
||||||
#define __SECTION_USED(s)
|
#define __SECTION_USED(s)
|
||||||
#else
|
#else
|
||||||
#define __ALIGNED __attribute__((aligned(32)))
|
#define __ALIGNED __attribute__((aligned(32)))
|
||||||
|
|
|
@ -138,6 +138,11 @@ void extractLatitudeLongitude(uint32_t * latitude, uint32_t * longitude)
|
||||||
*longitude = ((uint32_t)(qr.quot) * 1000000) + (((uint32_t)(qr.rem) * 10000 + telemetryData.hub.gpsLongitude_ap) * 5) / 3;
|
*longitude = ((uint32_t)(qr.quot) * 1000000) + (((uint32_t)(qr.rem) * 10000 + telemetryData.hub.gpsLongitude_ap) * 5) / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __clang__
|
||||||
|
// clang does not like packed member access at all. Since mavlink is a 3rd party library, ignore the errors
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic warning "-Waddress-of-packed-member"
|
||||||
|
#endif
|
||||||
void getGpsPilotPosition()
|
void getGpsPilotPosition()
|
||||||
{
|
{
|
||||||
extractLatitudeLongitude(&telemetryData.hub.pilotLatitude, &telemetryData.hub.pilotLongitude);
|
extractLatitudeLongitude(&telemetryData.hub.pilotLatitude, &telemetryData.hub.pilotLongitude);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue