Fix warnings
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9a5dabe..a3b8755 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml
@@ -40,7 +40,11 @@ mkdir build install cd build ../gcc/configure --enable-host-shared --enable-languages=c,jit,lto --disable-bootstrap --disable-multilib --prefix=/usr - make -j4 + bash -o pipefail -c 'make -j4 2>&1 | tee build.log' + if grep -E 'gcc/jit/.*:.*warning:' build.log; then + echo "Warnings detected in libgccjit" + exit 1 + fi make install DESTDIR=$(pwd)/../install - name: Build Debian package
diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 78e87fe..f809273 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc
@@ -7656,7 +7656,7 @@ for recording::memento_of_set_personality_function. */ void -recording::memento_of_set_personality_function::replay_into (replayer *r) +recording::memento_of_set_personality_function::replay_into (replayer *) { m_function->playback_function ()->set_personality_function (m_personality_function->playback_function ()); }
diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h index 4993e48..dce648c 100644 --- a/gcc/jit/jit-recording.h +++ b/gcc/jit/jit-recording.h
@@ -666,7 +666,7 @@ virtual bool is_same_type_as (type *other) { - if ((is_int () && other->is_int () || is_float() && other->is_float()) + if (((is_int () && other->is_int ()) || (is_float() && other->is_float())) && get_size () == other->get_size () && is_signed () == other->is_signed ()) { @@ -2298,7 +2298,7 @@ void replay_into (replayer *r) final override; - void set_name (const char *new_name) final override { + void set_name (const char *) final override { m_ctxt->add_error (NULL, "cannot change the name of type `array_access`"); } @@ -2363,7 +2363,7 @@ void visit_children (rvalue_visitor *v) final override; - void set_name (const char *new_name) final override { + void set_name (const char *) final override { m_ctxt->add_error (NULL, "cannot change the name of type `vector_access`"); } @@ -2396,7 +2396,7 @@ void visit_children (rvalue_visitor *v) final override; - void set_name (const char *new_name) final override { + void set_name (const char *) final override { m_ctxt->add_error ( NULL, "cannot change the name of type `access_field_of_lvalue`"); } @@ -2459,7 +2459,7 @@ void visit_children (rvalue_visitor *v) final override; - void set_name (const char *new_name) final override { + void set_name (const char *) final override { m_ctxt->add_error ( NULL, "cannot change the name of type `dereference_field_rvalue`"); } @@ -2490,7 +2490,7 @@ void visit_children (rvalue_visitor *v) final override; - void set_name (const char *new_name) final override { + void set_name (const char *) final override { m_ctxt->add_error ( NULL, "cannot change the name of type `dereference_rvalue`"); }
diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc index 6cf996e..8892ef9 100644 --- a/gcc/jit/libgccjit.cc +++ b/gcc/jit/libgccjit.cc
@@ -3068,7 +3068,7 @@ RETURN_IF_FAIL (try_block, ctxt, loc, "NULL rvalue"); RETURN_IF_FAIL (catch_block, ctxt, loc, "NULL rvalue"); - gcc::jit::recording::statement *stmt = block->add_try_catch (loc, try_block, catch_block); + /*gcc::jit::recording::statement *stmt =*/ block->add_try_catch (loc, try_block, catch_block); // TODO: remove this or use it. /* "stmt" should be good enough to be usable in error-messages, @@ -3097,7 +3097,7 @@ RETURN_IF_FAIL (try_block, ctxt, loc, "NULL rvalue"); RETURN_IF_FAIL (finally_block, ctxt, loc, "NULL rvalue"); - gcc::jit::recording::statement *stmt = block->add_try_catch (loc, try_block, finally_block, true); + /*gcc::jit::recording::statement *stmt =*/ block->add_try_catch (loc, try_block, finally_block, true); // TODO: remove this or use it. /* "stmt" should be good enough to be usable in error-messages,