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

src/main.c:106: poor choice of local data type ? #30

Closed
dcb314 opened this issue Dec 3, 2015 · 1 comment
Closed

src/main.c:106: poor choice of local data type ? #30

dcb314 opened this issue Dec 3, 2015 · 1 comment

Comments

@dcb314
Copy link

dcb314 commented Dec 3, 2015

[src/main.c:106]: (warning) Storing getchar() return value in char variable and then comparing with EOF.

    char c = getchar();
    if (c == '\n' || c == EOF)

Basic C knowledge, but the return value from getchar should always be
stored in an int, not char.

@adrienverge
Copy link
Owner

Good catch! A pull request is welcome.

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

No branches or pull requests

2 participants