AP_Scripting: suppress cast-align warnings in Lua interpreter

this is externally maintained code that makes heavy use of casting
This commit is contained in:
Andrew Tridgell 2020-07-07 13:15:14 +10:00
parent 71732d07f0
commit e9a4a74e7b
5 changed files with 11 additions and 2 deletions

View File

@ -29,7 +29,8 @@
#include "ltm.h"
#include "lvm.h"
// lua code does lots of casting, these warnings are not helpful
#pragma GCC diagnostic ignored "-Wcast-align"
#define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL)

View File

@ -33,7 +33,8 @@
#include "lvm.h"
#include "lzio.h"
// lua code does lots of casting, these warnings are not helpful
#pragma GCC diagnostic ignored "-Wcast-align"
#define errorstatus(s) ((s) > LUA_YIELD)

View File

@ -27,6 +27,8 @@
#include "ltable.h"
#include "lzio.h"
// lua code does lots of casting, these warnings are not helpful
#pragma GCC diagnostic ignored "-Wcast-align"
#define next(ls) (ls->current = zgetc(ls->z))

View File

@ -27,6 +27,9 @@
#include "ltable.h"
#include "ltm.h"
// lua code does lots of casting, these warnings are not helpful
#pragma GCC diagnostic ignored "-Wcast-align"
#if !defined(LUAI_GCPAUSE)
#define LUAI_GCPAUSE 200 /* 200% */

View File

@ -23,6 +23,8 @@
#include "ltm.h"
#include "lvm.h"
// lua code does lots of casting, these warnings are not helpful
#pragma GCC diagnostic ignored "-Wcast-align"
static const char udatatypename[] = "userdata";