Skip to content

Commit 6c53036

Browse files
committed
Fix errors when -Wall -Werror flags are set
1 parent fbdf29a commit 6c53036

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ matrix:
6868

6969
script:
7070
- if [ -L bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
71-
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O0 -ggdb3 -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DDEBUG\" -j2" &&
72-
eval ${PRE_COMMAND} ${COMMAND} &&
7371
COMMAND="make -C src minisat2-download" &&
7472
eval ${PRE_COMMAND} ${COMMAND} &&
7573
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare\" -j2" &&
7674
eval ${PRE_COMMAND} ${COMMAND} &&
7775
COMMAND="env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test" &&
7876
eval ${PRE_COMMAND} ${COMMAND} &&
7977
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir" &&
78+
eval ${PRE_COMMAND} ${COMMAND} &&
79+
COMMAND="make -C src clean" &&
80+
eval ${PRE_COMMAND} ${COMMAND} &&
81+
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O0 -ggdb3 -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DDEBUG\" -j2" &&
8082
eval ${PRE_COMMAND} ${COMMAND}

src/cbmc/bmc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ void bmct::setup_unwind()
687687

688688
for(auto &val : unwindset_loops)
689689
{
690-
unsigned thread_nr;
690+
unsigned thread_nr=0;
691691
bool thread_nr_set=false;
692692

693693
if(!val.empty() &&

src/java_bytecode/java_local_variable_table.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,6 @@ static void merge_variable_table_entries(
546546
merge_into.var.start_pc=found_dominator;
547547
merge_into.var.length=last_pc-found_dominator;
548548

549-
#ifdef DEBUG
550-
debug_out << "Merged " << merge_vars.size() << " variables named "
551-
<< merge_into.var.name << "; new live range "
552-
<< merge_into.var.start_pc << "-"
553-
<< merge_into.var.start_pc + merge_into.var.length
554-
<< messaget::eom;
555-
#endif
556-
557549
// Nuke the now-subsumed var-table entries:
558550
for(auto &v : merge_vars)
559551
if(v!=&merge_into)

src/util/union_find.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ class union_find:public numbering<T>
157157
// are 'a' and 'b' in the same set?
158158
bool same_set(const T &a, const T &b) const
159159
{
160-
typename subt::number_type na, nb;
160+
typedef typename subt::number_type subt_number_typet;
161+
subt_number_typet na=subt_number_typet(), nb=subt_number_typet();
161162
bool have_na=!subt::get_number(a, na),
162163
have_nb=!subt::get_number(b, nb);
163164

0 commit comments

Comments
 (0)