Skip to content

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

@dcb314

Description

@dcb314

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 ;
| ^~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions