summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Kendrick (humdrum) <rob.kendrick@codethink.co.uk>2013-04-25 14:34:05 (GMT)
committer Rob Kendrick (humdrum) <rob.kendrick@codethink.co.uk>2013-04-25 14:34:05 (GMT)
commit2d7c91290599619a78a6dfdd9ec230a76afe57a4 (patch)
tree1d5dbb7c1642a7792d4f6da9fbc86ead9c699eb9
parent4fae88dac6f26991335a66948ad29f480f7f148f (diff)
downloadnsgenbind-rjek/clang-warnings.tar.gz
nsgenbind-rjek/clang-warnings.tar.bz2
Silence warnings from clangrjek/clang-warnings
-rw-r--r--src/jsapi-libdom-operator.c2
-rw-r--r--src/jsapi-libdom-property.c8
-rw-r--r--src/nsgenbind-parser.y4
-rw-r--r--src/options.h4
-rw-r--r--src/webidl-parser.y4
5 files changed, 13 insertions, 9 deletions
diff --git a/src/jsapi-libdom-operator.c b/src/jsapi-libdom-operator.c
index f30bdb3..bb1ec36 100644
--- a/src/jsapi-libdom-operator.c
+++ b/src/jsapi-libdom-operator.c
@@ -695,7 +695,7 @@ output_operator_placeholder(struct binding *binding,
struct webidl_node *oplist,
struct webidl_node *ident_node)
{
- oplist = oplist;
+ UNUSED(oplist);
WARN(WARNING_UNIMPLEMENTED,
"operation %s.%s has no implementation\n",
diff --git a/src/jsapi-libdom-property.c b/src/jsapi-libdom-property.c
index 0f82c3f..ce82cae 100644
--- a/src/jsapi-libdom-property.c
+++ b/src/jsapi-libdom-property.c
@@ -749,7 +749,7 @@ output_property_placeholder(struct binding *binding,
struct webidl_node* oplist,
const char *ident)
{
- oplist=oplist;
+ UNUSED(oplist);
WARN(WARNING_UNIMPLEMENTED,
"property %s.%s has no implementation\n",
@@ -894,7 +894,7 @@ static int webidl_property_body_cb(struct webidl_node *node, void *ctx)
const char *ident;
struct webidl_node *type_node;
const char *type = NULL;
- int ret;
+ int ret = 0;
enum genbind_type_modifier shared_mod;
ident_node = webidl_node_find_type(webidl_node_getnode(node),
@@ -1014,7 +1014,7 @@ output_property_type_setter(struct binding *binding,
const char *type)
{
struct genbind_node *property_node;
- node = node;/* currently unused */
+ UNUSED(node);
fprintf(binding->outfile,
"static JSBool\n"
@@ -1052,7 +1052,7 @@ output_property_type_setter(struct binding *binding,
static int output_property_type_getter(struct binding *binding, struct genbind_node *node, const char *type)
{
struct genbind_node *property_node;
- node = node;/* currently unused */
+ UNUSED(node);
fprintf(binding->outfile,
"static JSBool JSAPI_PROP(%s_get, JSContext *cx, JSObject *obj, jsval *vp)\n"
diff --git a/src/nsgenbind-parser.y b/src/nsgenbind-parser.y
index 472e655..cfedd28 100644
--- a/src/nsgenbind-parser.y
+++ b/src/nsgenbind-parser.y
@@ -19,8 +19,8 @@ char *errtxt;
static void nsgenbind_error(YYLTYPE *locp, struct genbind_node **genbind_ast, const char *str)
{
- locp = locp;
- genbind_ast = genbind_ast;
+ (void)locp;
+ (void)genbind_ast;
errtxt = strdup(str);
}
diff --git a/src/options.h b/src/options.h
index ca71078..ba6d50b 100644
--- a/src/options.h
+++ b/src/options.h
@@ -39,4 +39,8 @@ enum opt_warnings {
} \
} while(0)
+#ifndef UNUSED
+# define UNUSED(x) (void) (x)
+#endif
+
#endif
diff --git a/src/webidl-parser.y b/src/webidl-parser.y
index 55ab221..1a0843f 100644
--- a/src/webidl-parser.y
+++ b/src/webidl-parser.y
@@ -27,8 +27,8 @@ char *errtxt;
static void
webidl_error(YYLTYPE *locp, struct webidl_node **winbind_ast, const char *str)
{
- locp = locp;
- winbind_ast = winbind_ast;
+ (void)locp;
+ (void)winbind_ast;
errtxt = strdup(str);
}