Skip to content

Commit 1c6a57e

Browse files
Include stdio.h in dtostrf.c
This makes the declaration of sprintf available, so the function is not implicitely declared, which triggers two compiler warnings. This helps towards #1792
1 parent 8e35973 commit 1c6a57e

File tree

1 file changed

+2
-0
lines changed
  • hardware/arduino/sam/cores/arduino/avr

1 file changed

+2
-0
lines changed

Diff for: hardware/arduino/sam/cores/arduino/avr/dtostrf.c

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1919
*/
2020

21+
#include <stdio.h>
22+
2123
char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
2224
char fmt[20];
2325
sprintf(fmt, "%%%d.%df", width, prec);

0 commit comments

Comments
 (0)