mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Changing from long to ssize_t (int) for write(), print(), println() return.
This commit is contained in:
@ -1121,7 +1121,7 @@ uint8_t SdFile::truncate(uint32_t length) {
|
||||
* for a read-only file, device is full, a corrupt file system or an I/O error.
|
||||
*
|
||||
*/
|
||||
long SdFile::write(const void* buf, uint16_t nbyte) {
|
||||
ssize_t SdFile::write(const void* buf, uint16_t nbyte) {
|
||||
// convert void* to uint8_t* - must be before goto statements
|
||||
const uint8_t* src = reinterpret_cast<const uint8_t*>(buf);
|
||||
|
||||
@ -1219,7 +1219,7 @@ long SdFile::write(const void* buf, uint16_t nbyte) {
|
||||
*
|
||||
* Use SdFile::writeError to check for errors.
|
||||
*/
|
||||
long SdFile::write(uint8_t b) {
|
||||
ssize_t SdFile::write(uint8_t b) {
|
||||
return write(&b, 1);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
@ -1228,7 +1228,7 @@ long SdFile::write(uint8_t b) {
|
||||
*
|
||||
* Use SdFile::writeError to check for errors.
|
||||
*/
|
||||
long SdFile::write(const char* str) {
|
||||
ssize_t SdFile::write(const char* str) {
|
||||
return write(str, strlen(str));
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user