This is the answer to the question LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right Why I am getting undefined references?, however that answer brings another question.
On the file abntex2cite there are these lines which seem inoffensive:
%we are repeating \bibcite command as defined in hyperref.sty
%so that we have it all together at one place.
\ifthenelse{\boolean{ABNThyperref}}{% not comment this, but the next two, to fix the warning
\renewcommand{\bibcite}[2]{%
\@newl@bel{b}{#1}{\hyper@@link[cite]{}{cite.#1}{#2}}}%
After several hours commenting things out on that abntex2cite package and testing it against a simple example:
% How to make \PassOptionsToPackage add the option as the last option?
% https://tex.stackexchange.com/questions/385895/how-to-make-passoptionstopackage-add
\PassOptionsToPackage{brazil,main=english}{babel}
\documentclass[10pt,openright,twoside,a5paper]{abntex2}
\usepackage{filecontents}
\usepackage[alf]{abntex2cite}
% Package hyperref Warning: Token not allowed in a PDF string?
% https://tex.stackexchange.com/questions/384885/package-hyperref-warning-token-not
\pdfstringdefDisableCommands{\let\uppercase\relax}
\begin{document}
% How does 'filecontents' keep LaTeX parsing while temporarily stop writing output
% https://tex.stackexchange.com/questions/104159/how-does-filecontents-keep-latex-parsing
\begin{filecontents*}{refs2.bib}
@manual{abntex2classe,
Author = {abnTeX2 and Lauro C{\'e}sar Araujo},
Date-Added = {2013-01-09 10:37:38 +0000},
Date-Modified = {2013-04-05 11:03:48 +0000},
Organization = {Equipe abnTeX2},
Title = {A classe abntex2},
Url = {http://abntex2.googlecode.com/},
Year = {2013},
Bdsk-Url-1 = {http://code.google.com/p/abntex2/}}
\end{filecontents*}
The \cite{abntex2classe}.
\bibliography{refs2}
\end{document}
I find out these lines are causing this warning to show up every time I compile my latex files:
Basic Builder: running pdflatex...done.
running pdflatex...done.
No errors. Warnings:
D:\test.tex: LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
No bad boxes.
Hence if I comment these lines on the abntex2cite.sty file, my simple latex file compiles without any warnings:
Basic Builder: running pdflatex...done.
running bibtex...done.
running pdflatex...done.
running pdflatex...done.
No errors. No warnings. No bad boxes.
What are these lines doing? Is there a way to fix them, so they do not cause the warning LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right every time I compile my simple file?
%we are repeating \bibcite command as defined in hyperref.sty
%so that we have it all together at one place.
\ifthenelse{\boolean{ABNThyperref}}{% not comment this, but the next two, to fix the warning
\renewcommand{\bibcite}[2]{%
\@newl@bel{b}{#1}{\hyper@@link[cite]{}{cite.#1}{#2}}}%