From 2983d5e1de0de153e14f0de040ad8984a3102656 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 18 Jan 2016 21:00:24 +0100 Subject: [PATCH] quench warnings (closes #69) --- include/pybind11/attr.h | 8 ++++---- include/pybind11/pybind11.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/pybind11/attr.h b/include/pybind11/attr.h index 9a646cb6..757b1cb3 100644 --- a/include/pybind11/attr.h +++ b/include/pybind11/attr.h @@ -255,19 +255,19 @@ template struct process_attribute struct process_attributes { static void init(const Args&... args, function_record *r) { int unused[] = { 0, (process_attribute::type>::init(args, r), 0) ... }; - (void) unused; + (void) unused; (void) r; } static void init(const Args&... args, type_record *r) { int unused[] = { 0, (process_attribute::type>::init(args, r), 0) ... }; - (void) unused; + (void) unused; (void) r; } static void precall(handle fn_args) { int unused[] = { 0, (process_attribute::type>::precall(fn_args), 0) ... }; - (void) unused; + (void) unused; (void) fn_args; } static void postcall(handle fn_args, handle fn_ret) { int unused[] = { 0, (process_attribute::type>::postcall(fn_args, fn_ret), 0) ... }; - (void) unused; + (void) unused; (void) fn_args; (void) fn_ret; } }; diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 9fecaa98..25e25ca9 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -22,6 +22,9 @@ # pragma GCC diagnostic ignored "-Wunused-but-set-parameter" # pragma GCC diagnostic ignored "-Wunused-but-set-variable" # pragma GCC diagnostic ignored "-Wmissing-field-initializers" +# if __GNUC__ >= 4 +# pragma GCC diagnostic ignored "-Wno-invalid-offsetof" +# endif #endif #include "attr.h"