Follow-up Comment #3, patch #8228 (project avrdude):

Finally, there's a one warning remaining:


linuxspi.c: In function ‘linuxspi_gpio_op_wr’:
linuxspi.c:170:5: warning: format not a string literal and no format arguments
[-Wformat-security]
     if (fprintf(f, val) < 0)


If I get it correctly, it would not even be necessary to use fprintf here, as
"val" is always a fixed string when being passed to linuxspi_gpio_op_wr(),
correct?

Thus, replacing "fprintf(f, val) < 0" by "fputs(val, f) != EOF" ought to be a
better solution (and avoids the overhead of fprintf trying to interpret a
format string that is known to not have format conversions at all).

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?8228>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


Reply via email to