Status: New
Owner: ----
New issue 2883 by [email protected]: Noisy embedder build with
-Wunused-parameter
http://code.google.com/p/v8/issues/detail?id=2883
Including v8.h in a file that is compiled with -Wunused-parameter (or -Wall
-Wextra) generates a number of warnings:
/home/bnoordhuis/src/v8/include/v8.h:3676:7: warning: unused
parameter 'name' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:4241:16: warning: unused
parameter 'string' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:4251:16: warning: unused
parameter 'value' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:4251:16: warning: unused
parameter 'class_id' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:4264:13: warning: unused
parameter 'isolate' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5232:23: warning: unused
parameter 'data' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5232:23: warning: unused
parameter 'count' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5387:25: warning: unused
parameter 'isolate' [-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5485:25: warning: unused parameter 'o'
[-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5486:25: warning: unused parameter 'o'
[-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5487:25: warning: unused parameter 'o'
[-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5488:25: warning: unused parameter 'o'
[-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5489:25: warning: unused parameter 'o'
[-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5490:25: warning: unused parameter 'o'
[-Wunused-parameter]
/home/bnoordhuis/src/v8/include/v8.h:5491:25: warning: unused parameter 'o'
[-Wunused-parameter]
The patch below works around it but it's probably better to squelch the
warnings on a case-by-case basis.
diff --git a/include/v8.h b/include/v8.h
index de27338..f3ba334 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -38,6 +38,11 @@
#ifndef V8_H_
#define V8_H_
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
#include "v8stdint.h"
// We reserve the V8_* prefix for macros defined in V8 public API and
@@ -6436,5 +6441,8 @@ void* Context::GetAlignedPointerFromEmbedderData(int
index) {
#undef TYPE_CHECK
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop // -Wunused-argument
+#endif
#endif // V8_H_
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.