Created
October 21, 2023 08:14
-
-
Save eblot/08f3774e913a2734ad5a2120fbb8802a to your computer and use it in GitHub Desktop.
Newlib: Fix warning in stdio.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h | |
index 7748351..b94a847 100644 | |
--- a/newlib/libc/include/stdio.h | |
+++ b/newlib/libc/include/stdio.h | |
@@ -690,7 +690,7 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { | |
__sputc_r (_ptr, '\r', _p); | |
#endif | |
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) | |
- return (*_p->_p++ = _c); | |
+ return (*_p->_p++ = (unsigned char)_c); | |
else | |
return (__swbuf_r(_ptr, _c, _p)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment