From f810b7b9f651dcf830cd98758d1007e5afa0f3d0 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Fri, 28 Sep 2018 01:40:36 -0700 Subject: [PATCH] AP_HAL_ChibiOS: Make getcwd() take size_t as per the standard --- libraries/AP_HAL_ChibiOS/hwdef/common/posix.c | 2 +- libraries/AP_HAL_ChibiOS/hwdef/common/posix.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/posix.c b/libraries/AP_HAL_ChibiOS/hwdef/common/posix.c index 3a9e34f3fb..2221badbae 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/posix.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/posix.c @@ -1594,7 +1594,7 @@ int fchmod(int fd, mode_t mode) /// @return 0 on sucess. /// @return -1 on error with errno set. -char *getcwd(char *pathname, int len) +char *getcwd(char *pathname, size_t len) { int res; errno = 0; diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/posix.h b/libraries/AP_HAL_ChibiOS/hwdef/common/posix.h index a45baf1a78..86761523bb 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/posix.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/posix.h @@ -361,7 +361,7 @@ int dirname ( char *str ); int fchmod ( int fd , mode_t mode ); #endif -char *getcwd ( char *pathname , int len ); +char *getcwd ( char *pathname , size_t len ); int mkdir ( const char *pathname , mode_t mode ); int rename ( const char *oldpath , const char *newpath ); int rmdir ( const char *pathname );