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

Error in the geany code in c #1008

Closed
derskiy opened this issue Sep 17, 2020 · 2 comments
Closed

Error in the geany code in c #1008

derskiy opened this issue Sep 17, 2020 · 2 comments

Comments

@derskiy
Copy link

derskiy commented Sep 17, 2020

#include <stdio.h>
int main() {
char ch[10];
scanf("%s",&ch);
printf(ch);
}
On line scanf("% s", & ch); shows an error, but it is running and working, my question is, why does the Netbeans IDE 8.2 program show everything normally without any errors, but in the Geany 1.36 program it shows an error but is executed?

@elextr
Copy link
Member

elextr commented Sep 17, 2020

Geany only shows errors and warnings that your compiler finds, so you need to ask the compiler why, and it will depend on the particular compiler, its version, and its defaults.

Here using gcc 9.3.0 there are warnings on both the scanf and the printf, both valid warnings of bad practice but neither illegal C (which is why they are warnings not errors) nor (in this case) do they do the wrong thing when executed, but thats C for you.

Why hasbeens doesn't show the warnings is a problem for it.

@elextr
Copy link
Member

elextr commented Sep 17, 2020

Also this is the issues for Geany plugins, not for Geany itself.

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