Pass a character array, and not its address, to fscanf()
authorPhil Miller <mille121@illinois.edu>
Thu, 5 May 2011 00:14:21 +0000 (19:14 -0500)
committerPhil Miller <mille121@illinois.edu>
Thu, 5 May 2011 00:31:53 +0000 (19:31 -0500)
Address a warning about passing a pointer to a character array, rather
than the array itself, to a function expecting char*.

src/conv-core/global-elfcopy.C

index 811b9c2eea5f05baaac56ce02f879346068f06d9..7bba5c4a7d4394886e7ca81457df972f5272d39e 100644 (file)
@@ -178,7 +178,7 @@ printf("Loading globals from file \"%s\" ... \n", fname);
     while (!feof(gf)) 
     {
       char name[1024];
-      fscanf(gf, "%s\n", &name);
+      fscanf(gf, "%s\n", name);
       _namelist.push_back(strdup(name));
     }
     fclose(gf);