Skip to content

Commit 2e6a09a

Browse files
committed
Fix warnings
1 parent df3fc78 commit 2e6a09a

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ jobs:
4040
mkdir build install
4141
cd build
4242
../gcc/configure --enable-host-shared --enable-languages=c,jit,lto --disable-bootstrap --disable-multilib --prefix=/usr
43-
make -j4
43+
bash -o pipefail -c 'make -j4 2>&1 | tee build.log'
44+
if grep -E 'gcc/jit/.*:.*warning:' build.log; then
45+
echo "Warnings detected in libgccjit"
46+
exit 1
47+
fi
4448
make install DESTDIR=$(pwd)/../install
4549
4650
- name: Build Debian package

gcc/jit/jit-recording.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7656,7 +7656,7 @@ recording::statement::write_to_dump (dump &d)
76567656
for recording::memento_of_set_personality_function. */
76577657

76587658
void
7659-
recording::memento_of_set_personality_function::replay_into (replayer *r)
7659+
recording::memento_of_set_personality_function::replay_into (replayer *)
76607660
{
76617661
m_function->playback_function ()->set_personality_function (m_personality_function->playback_function ());
76627662
}

gcc/jit/jit-recording.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ class type : public memento
666666

667667
virtual bool is_same_type_as (type *other)
668668
{
669-
if ((is_int () && other->is_int () || is_float() && other->is_float())
669+
if (((is_int () && other->is_int ()) || (is_float() && other->is_float()))
670670
&& get_size () == other->get_size ()
671671
&& is_signed () == other->is_signed ())
672672
{
@@ -2298,7 +2298,7 @@ class array_access : public lvalue
22982298

22992299
void replay_into (replayer *r) final override;
23002300

2301-
void set_name (const char *new_name) final override {
2301+
void set_name (const char *) final override {
23022302
m_ctxt->add_error (NULL, "cannot change the name of type `array_access`");
23032303
}
23042304

@@ -2363,7 +2363,7 @@ class vector_access : public lvalue
23632363

23642364
void visit_children (rvalue_visitor *v) final override;
23652365

2366-
void set_name (const char *new_name) final override {
2366+
void set_name (const char *) final override {
23672367
m_ctxt->add_error (NULL, "cannot change the name of type `vector_access`");
23682368
}
23692369

@@ -2396,7 +2396,7 @@ class access_field_of_lvalue : public lvalue
23962396

23972397
void visit_children (rvalue_visitor *v) final override;
23982398

2399-
void set_name (const char *new_name) final override {
2399+
void set_name (const char *) final override {
24002400
m_ctxt->add_error (
24012401
NULL, "cannot change the name of type `access_field_of_lvalue`");
24022402
}
@@ -2459,7 +2459,7 @@ class dereference_field_rvalue : public lvalue
24592459

24602460
void visit_children (rvalue_visitor *v) final override;
24612461

2462-
void set_name (const char *new_name) final override {
2462+
void set_name (const char *) final override {
24632463
m_ctxt->add_error (
24642464
NULL, "cannot change the name of type `dereference_field_rvalue`");
24652465
}
@@ -2490,7 +2490,7 @@ class dereference_rvalue : public lvalue
24902490

24912491
void visit_children (rvalue_visitor *v) final override;
24922492

2493-
void set_name (const char *new_name) final override {
2493+
void set_name (const char *) final override {
24942494
m_ctxt->add_error (
24952495
NULL, "cannot change the name of type `dereference_rvalue`");
24962496
}

gcc/jit/libgccjit.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,7 +3068,7 @@ gcc_jit_block_add_try_catch (gcc_jit_block *block,
30683068
RETURN_IF_FAIL (try_block, ctxt, loc, "NULL rvalue");
30693069
RETURN_IF_FAIL (catch_block, ctxt, loc, "NULL rvalue");
30703070

3071-
gcc::jit::recording::statement *stmt = block->add_try_catch (loc, try_block, catch_block);
3071+
/*gcc::jit::recording::statement *stmt =*/ block->add_try_catch (loc, try_block, catch_block);
30723072

30733073
// TODO: remove this or use it.
30743074
/* "stmt" should be good enough to be usable in error-messages,
@@ -3097,7 +3097,7 @@ gcc_jit_block_add_try_finally (gcc_jit_block *block,
30973097
RETURN_IF_FAIL (try_block, ctxt, loc, "NULL rvalue");
30983098
RETURN_IF_FAIL (finally_block, ctxt, loc, "NULL rvalue");
30993099

3100-
gcc::jit::recording::statement *stmt = block->add_try_catch (loc, try_block, finally_block, true);
3100+
/*gcc::jit::recording::statement *stmt =*/ block->add_try_catch (loc, try_block, finally_block, true);
31013101

31023102
// TODO: remove this or use it.
31033103
/* "stmt" should be good enough to be usable in error-messages,

0 commit comments

Comments
 (0)