Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFE-2703: Removing undeclared references #2923

Merged
merged 1 commit into from Dec 4, 2017
Merged

CFE-2703: Removing undeclared references #2923

merged 1 commit into from Dec 4, 2017

Conversation

eli-taft-quoin
Copy link
Contributor

@eli-taft-quoin eli-taft-quoin commented Oct 13, 2017

This pull request is to fix the following bug found when running make install.

$ make install
Making install in libcompat
Making install in libutils
Making install in libcfnet
Making install in libenv
Making install in libpromises
YACC cf3parse.c
byacc: 1 shift/reduce conflict.
updating cf3parse.h
CC cf3parse.lo
cf3parse.y: In function 'yyparse':
cf3parse.y:496:79: error: 'YYEOF' undeclared (first use in this function)
if (yychar == BUNDLE || yychar == BODY || yychar == YYEOF)
^
cf3parse.y:496:79: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [cf3parse.lo] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

I figured, since it's not declared and not used elsewhere in the file, perhaps it's not needed.

Ticket: https://tracker.mender.io/browse/CFE-2703

@nickanderson nickanderson changed the title Removing undeclared references CFE-2703: Removing undeclared references Oct 17, 2017
@jimis
Copy link
Contributor

jimis commented Nov 16, 2017

YYEOF exists in Bison. I want some verification that it's not really needed, in order to merge this.

EDIT: As I can see, YYEOF is just defined to zero from bison. So maybe the following would resolve the error:

#ifndef YYEOF
# define YYEOF 0
#endif

Copy link
Contributor

@jimis jimis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to define YYEOF to zero, if it's not defined. See previous comment.

@jimis
Copy link
Contributor

jimis commented Dec 2, 2017

@basvandervlies if you say that removing YYEOF is good, I'll go ahead and merge as it is.

@jimis jimis merged commit 98caf14 into cfengine:master Dec 4, 2017
@jimis
Copy link
Contributor

jimis commented Dec 4, 2017

Discussion in CFE-2703. Merged and cherry-picked to 3.11.x, 3.10.x and 3.7.x. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants