RTimothyEdwards / XCircuit

XCircuit circuit drawing and schematic capture tool
GNU General Public License v2.0
110 stars 24 forks source link

fix format not a string literal and no format arguments #11

Open IEAST opened 3 years ago

IEAST commented 3 years ago
svg.c:1136:7: error: format not a string literal and no format arguments [-Werror=format-security]
 1136 |       sprintf(filename, Tcl_GetString(objv[1]));
      |       ^~~~~~~
svg.c:1139:7: error: format not a string literal and no format arguments [-Werror=format-security]
 1139 |       sprintf(filename, xobjs.pagelist[areawin->page]->filename);
      |       ^~~~~~~
svg.c:1141:76: error: format not a string literal and no format arguments [-Werror=format-security]
 1141 |       sprintf(filename, xobjs.pagelist[areawin->page]->pageinst->thisobject->name);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

I tried to fix the problem of not compiling after enabling the -Werror=format-security option.

RTimothyEdwards commented 3 years ago

Pulled and merged. Thanks for the fix!

RTimothyEdwards commented 3 years ago

Note: Updated the repository on opencircuitdesign.com. The github repo will update automatically by mirror copy overnight (in about 15 hours from now).