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

terminal-defs.h:36: bad array size ? #64

Open
dcb314 opened this issue Oct 27, 2020 · 0 comments
Open

terminal-defs.h:36: bad array size ? #64

dcb314 opened this issue Oct 27, 2020 · 0 comments

Comments

@dcb314
Copy link

dcb314 commented Oct 27, 2020

terminal-defs.h:36:38: warning: division 'sizeof (struct _attack_definition *) / sizeof (struct _attack_definition)' does not compute the number of array elements [-Wsizeof-pointer-div]
36 | #define SIZE_ARRAY(x) ( (sizeof(x))/(sizeof(x[0])) )
| ^
gtk-interface.c:969:43: note: in expansion of macro 'SIZE_ARRAY'
969 | attacks_v_table = gtk_table_new (SIZE_ARRAY(attack_def), 3, FALSE);
| ^~~~~~~~~~
gtk-interface.c:929:32: note: first 'sizeof' operand was declared here
929 | struct _attack_definition *attack_def ;
| ^~~~~~~~~~

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