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

Function prototype counted as global variable. #506

Open
sugoidesune opened this issue Jul 23, 2024 · 0 comments
Open

Function prototype counted as global variable. #506

sugoidesune opened this issue Jul 23, 2024 · 0 comments

Comments

@sugoidesune
Copy link

sugoidesune commented Jul 23, 2024

Describe the bug
Function prototype counted as global variable.

Erroneous code

int (*grid(void))[8]; 

Additional infos
norminette 3.3.55

Notice: GLOBAL_VAR_DETECTED  (line:  15, col:   1):	Global variable present in file. Make sure it is a reasonable choice.
Error: GLOBAL_VAR_NAMING    (line:  15, col:   7):	Global variable must start with g_

Additional context
This function throws no norminette or compiler errors, compiles properly and maintains the proper return type.

int (*grid(int agrid[5][8]))[8] {

   // ... computation etc
    return agrid;
}
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

1 participant