Skip to content

Commit a13a0dd

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 arduino#1792
1 parent 52978c7 commit a13a0dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: 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)