Test case warning fixes for nodejs
nodejs 4.2.1 on Ubuntu Xenial Xerus
This commit is contained in:
parent
0177937f7e
commit
56ab717ff3
7 changed files with 61 additions and 0 deletions
|
|
@ -6,6 +6,12 @@ The primary purpose of this testcase is to ensure that enums used along with the
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
|
||||||
|
/* for anonymous enums */
|
||||||
|
/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
|
|
||||||
enum SOME_ENUM {ENUM_ONE, ENUM_TWO};
|
enum SOME_ENUM {ENUM_ONE, ENUM_TWO};
|
||||||
|
|
||||||
struct StructWithEnums {
|
struct StructWithEnums {
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,12 @@
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
|
||||||
|
/* for anonymous enums */
|
||||||
|
/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
|
|
||||||
enum { AnonEnum1, AnonEnum2 = 100 };
|
enum { AnonEnum1, AnonEnum2 = 100 };
|
||||||
enum { ReallyAnInteger = 200 };
|
enum { ReallyAnInteger = 200 };
|
||||||
//enum { AnonEnum3, AnonEnum4 } instance;
|
//enum { AnonEnum3, AnonEnum4 } instance;
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,12 @@
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
|
||||||
|
/* for anonymous enums */
|
||||||
|
/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CSP_ITERATION_FWD,
|
CSP_ITERATION_FWD,
|
||||||
CSP_ITERATION_BWD = 11
|
CSP_ITERATION_BWD = 11
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,18 @@ Also tests reported error when a #define placed in a deeply embedded struct/unio
|
||||||
%rename(InUnNamed) OuterStructNamed::Inner_union_named;
|
%rename(InUnNamed) OuterStructNamed::Inner_union_named;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SWIG_JAVASCRIPT_V8)
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
|
||||||
|
/* for nested C class wrappers compiled as C++ code */
|
||||||
|
/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
struct TestStruct {
|
struct TestStruct {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,17 @@
|
||||||
%module nested_extend_c
|
%module nested_extend_c
|
||||||
|
|
||||||
|
#if defined(SWIG_JAVASCRIPT_V8)
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
|
||||||
|
/* for nested C class wrappers compiled as C++ code */
|
||||||
|
/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8)
|
#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8)
|
||||||
%extend hiA {
|
%extend hiA {
|
||||||
hiA() {
|
hiA() {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,17 @@
|
||||||
%module nested_structs
|
%module nested_structs
|
||||||
|
|
||||||
|
#if defined(SWIG_JAVASCRIPT_V8)
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
|
||||||
|
/* for nested C class wrappers compiled as C++ code */
|
||||||
|
/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// bug #491476
|
// bug #491476
|
||||||
%inline %{
|
%inline %{
|
||||||
struct Outer {
|
struct Outer {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
%module typedef_struct
|
%module typedef_struct
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
|
||||||
|
/* for anonymous enums */
|
||||||
|
/* dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] */
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int numpoints;
|
int numpoints;
|
||||||
} LineObj;
|
} LineObj;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue