diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2019-03-24 21:23:50 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2019-05-07 21:59:19 -0700 |
commit | ba402686184acbd8fcf823706ae7e25e9b793e2d (patch) | |
tree | 198cd0945092123a3b226c88a281b9e56b5aed8b /gjs/coverage.cpp | |
parent | 531464bd72779a7b7bf45b461ca67301b95e6ba9 (diff) | |
download | gjs-ba402686184acbd8fcf823706ae7e25e9b793e2d.tar.gz |
build: Annotate all unused arguments
In order to compile cleanly with -Wunused-parameter, we annotate all
unused function parameters. We do have a lot of these, as we make heavy
use of callbacks and don't always need all the parameters of these
callbacks.
If the parameter name does not carry any meaning (for example,
JSContext* cx, or void* user_data) then we just delete the name and
leave the type to indicate that it is intentionally unused. If the name
is important, then we annotate the parameter with G_GNUC_UNUSED.
In the case where a parameter is used in one branch of an #ifdef only,
we mark it in the other branch with a (void) cast.
Diffstat (limited to 'gjs/coverage.cpp')
-rw-r--r-- | gjs/coverage.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp index 2e3055db..13118df7 100644 --- a/gjs/coverage.cpp +++ b/gjs/coverage.cpp @@ -317,10 +317,7 @@ gjs_coverage_write_statistics(GjsCoverage *coverage) g_message("Wrote coverage statistics to %s", output_file_path.get()); } -static void -gjs_coverage_init(GjsCoverage *self) -{ -} +static void gjs_coverage_init(GjsCoverage*) {} static void coverage_tracer(JSTracer *trc, void *data) |