Rodando esse comando no terminal:
g++ -Wall -Werror teste.cpp -o teste && ./teste
Obtenho essa saída:
teste.cpp: In function ‘void buscaSeqRec(ListaEncadeada&, dados&)’:
teste.cpp:413:13: error: unused variable ‘t’ [-Werror=unused-variable]
int t = binariaC(v, 0, tam, dado);
^
teste.cpp:415:13: error: unused variable ‘t’ [-Werror=unused-variable]
int t = binariaD(v, 0, tam, dado);
^ teste.cpp: In function ‘int binariaC(dados*, int, int, dados&)’:
teste.cpp:368:1: error: control reaches end of non-void function [-Werror=return-type]
}
^ teste.cpp: In function ‘int binariaD(dados*, int, int, dados&)’:
teste.cpp:386:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
teste.cpp: In function ‘void buscaSeqRec(ListaEncadeada&, dados&)’:
teste.cpp:419:5: error: ‘t’ is used uninitialized in this function [-Werror=uninitialized]
if (t == -1) {
^
cc1plus: all warnings being treated as errors
Passar bem.