Qualquer coisa suspeita é barrada, e só compila se isso for resolvido.
Declarei as variáveis, e a lista reduziu:
Agora sobraram variáveis inúteis, valores inúteis, e declaração de método errada,Compiling 'hbMDFe.prg'...
hbMDFe.prg(99) Warning W0001 Method <LinkWebService(cServ)> not declared or declaration mismatch in class <hbMDFe>
hbMDFe.prg(121) Warning W0032 Variable 'NSCAN' is assigned but not used in function 'HBMDFE_LINKWEBSERVICE(105)'
hbMDFe.prg(243) Warning W0032 Variable 'MI' is assigned but not used in function 'HBMDFE_XMLIDE(127)'
hbMDFe.prg(509) Warning W0032 Variable 'MI' is assigned but not used in function 'HBMDFE_XMLMODALRODOVIARIO(362)'
hbMDFe.prg(811) Warning W0032 Variable 'MI' is assigned but not used in function 'HBMDFE_XMLDOCUMENTOS(516)'
hbMDFe.prg(811) Warning W0032 Variable 'CI' is assigned but not used in function 'HBMDFE_XMLDOCUMENTOS(516)'
hbMDFe.prg(901) Warning W0032 Variable 'MI' is assigned but not used in function 'HBMDFE_XMLTOT(818)'
hbMDFe.prg(1108) Warning W0032 Variable 'CXMLSIG' is assigned but not used in function 'HBMDFE_ASSINA_XML(908)'
hbMDFe.prg(1108) Warning W0032 Variable 'POSINI' is assigned but not used in function 'HBMDFE_ASSINA_XML(909)'
hbMDFe.prg(1108) Warning W0032 Variable 'POSFIM' is assigned but not used in function 'HBMDFE_ASSINA_XML(909)'
hbMDFe.prg(1108) Warning W0032 Variable 'NP' is assigned but not used in function 'HBMDFE_ASSINA_XML(909)'
hbMDFe.prg(1108) Warning W0032 Variable 'NRESULT' is assigned but not used in function 'HBMDFE_ASSINA_XML(909)'
hbMDFe.prg(1296) Warning W0032 Variable 'CURLWS' is assigned but not used in function 'HBMDFE_COMUNICAWEBSERVICE(1210)'
hbMDFe.prg(1365) Warning W0003 Variable 'OSERVERWS' declared but not used in function 'HBMDFE_RECEPCAOMDFE(1301)'
hbMDFe.prg(1365) Warning W0032 Variable 'CCERT' is assigned but not used in function 'HBMDFE_RECEPCAOMDFE(1303)'
hbMDFe.prg(1365) Warning W0032 Variable 'CURLWS' is assigned but not used in function 'HBMDFE_RECEPCAOMDFE(1303)'
hbMDFe.prg(1365) Warning W0032 Variable 'CXMLRESP' is assigned but not used in function 'HBMDFE_RECEPCAOMDFE(1303)'
hbMDFe.prg(1453) Warning W0032 Variable 'CXMLRESP' is assigned but not used in function 'HBMDFE_RETRECEPCAOMDFE(1371)'
hbMDFe.prg(1565) Warning W0032 Variable 'CXMLRESP' is assigned but not used in function 'HBMDFE_CONSULTAMDF(1459)'
hbMDFe.prg(1565) Warning W0032 Variable 'CXMLINFPROT' is assigned but not used in function 'HBMDFE_CONSULTAMDF(1459)'
hbMDFe.prg(1565) Warning W0032 Variable 'CXMLEVENTOMDFE' is assigned but not used in function 'HBMDFE_CONSULTAMDF(1459)
'
hbMDFe.prg(1565) Warning W0032 Variable 'CXMLEVCANCMDFE' is assigned but not used in function 'HBMDFE_CONSULTAMDF(1459)
'
hbMDFe.prg(1565) Warning W0032 Variable 'CXMLRETEVENTOMDFE' is assigned but not used in function 'HBMDFE_CONSULTAMDF(14
59)'
hbMDFe.prg(1619) Warning W0001 Method <MDFeEvento(cXMLeve)> not declared or declaration mismatch in class <hbMDFe>
hbMDFe.prg(1619) Warning W0032 Variable 'CXMLRESP' is assigned but not used in function 'HBMDFE_STATUSSERVICO(1571)'
hbMDFe.prg(1816) Warning W0032 Variable 'CXMLRESP' is assigned but not used in function 'HBMDFE_MDFECANCELA(1745)'
2000
Este último é algo como declarar que vai ser Metodo( numero ), e fazer Metodo( outracoisa ), ou quantidade de parâmetros diferentes.
Declarar que vai ser Metodo( a ), mas criar a rotina como Método( a, b )
Mas isso é o "tolerância zero" ( -w3 -es2 ).
Qualquer coisa suspeita é rejeitada, obrigatoriamente tem que corrigir.
Pode ser apenas resto de fonte perdido, mas pode ser erro também.
Com isso podemos mais uma vez encontrar erro "sem querer".
De repente pode ser nome de variável errado, e não variável inútil.
O compilador OBRIGA que isso seja revisto.
Se nesse meio tempo precisar liberar programa, é só compilar normalmente, sem o -w3 -es2.
Não é porque usou isso que vai ser obrigado a terminar todo fonte de uma vez.
Nesta parte de avisos, usar variáveis PUBLIC e PRIVATE faz muita diferença.
Significa que boa parte dessa checagem vai ser DESPREZADA.
Em PUBLIC e PRIVATE o compilador não sabe se elas existiam antes, ou se vão ser usadas depois, então se existir variável desse tipo que seja inútil, vai continuar existindo.Mesmo que o nome esteja errado, o compilador não tem como saber.
Parece que é perder tempo, fazendo coisa que não precisava antes.
Mas o compilador está te AJUDANDO, CONFERINDO seu fonte, e já te AVISANDO de erros que poderiam acontecer depois.
Pra conferir direito, ele precisa de mais informações, que justamente estão nas declarações de variáveis.
E quanto estiver usando pra valer, vai mexer nos fontes sem medo, porque seu ajudante não vai deixar escapar nada.

