mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
build: avoid possibly-replaced fprintf in liby-source, yyerror.c
* lib/yyerror.c (yyerror): Use fputs and fputc rather than fprintf with a mere "%s\n" format. Always return 0 now, on the assumption that the return value was never used anyway. Don't include <config.h> after all. This avoids a problem reported by Thiru Ramakrishnan in http://lists.gnu.org/archive/html/help-bison/2011-11/msg00000.html * cfg.mk: Exempt lib/yyerror.c from the sc_require_config_h_first test. * THANKS: Update.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int yyerror (char const *);
|
||||
@@ -25,5 +24,7 @@ int yyerror (char const *);
|
||||
int
|
||||
yyerror (char const *message)
|
||||
{
|
||||
return fprintf (stderr, "%s\n", message);
|
||||
fputs (message, stderr);
|
||||
fputc ('\n', stderr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user