Squashes a compiler warning:
gui/frmobjectui.c:580:10: warning: declaration of ‘line’ shadows a global
declaration [-Wshadow]
580 | char line[BUFSIZ];
| ^~~~
In file included from ./smyrnadefs.h:27,
from gui/gui.h:13,
from gui/frmobjectui.c:15:
../../lib/glcomp/glutils.h:25:7: note: shadowed declaration is here
25 | } line;
| ^~~~
attr_list *l;
FILE *file;
Agsym_t *sym; /*cgraph atttribute */
- char line[BUFSIZ];
+ char buffer[BUFSIZ];
static char *smyrna_attrs;
char *a;
file = fopen(smyrna_attrs, "r");
if (file != NULL) {
int i = 0;
- while (fgets(line, BUFSIZ, file) != NULL) {
+ while (fgets(buffer, sizeof(buffer), file) != NULL) {
int idx = 0;
attr = new_attr();
- a = strtok(line, ",");
+ a = strtok(buffer, ",");
attr->index = i;
attr->type = get_attr_data_type(a[0]);
while ((a = strtok(NULL, ","))) {