suppress not used variables

This commit is contained in:
Thomas Kuschel 2022-07-16 01:58:08 +02:00
parent 41afeeee53
commit 6370f51af0
2 changed files with 23 additions and 0 deletions

View File

@ -52,6 +52,8 @@ int _getpid(void)
int _kill(int pid, int sig) int _kill(int pid, int sig)
{ {
(void)pid;
(void)sig;
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
@ -65,6 +67,7 @@ void _exit (int status)
__attribute__((weak)) int _read(int file, char *ptr, int len) __attribute__((weak)) int _read(int file, char *ptr, int len)
{ {
int DataIdx; int DataIdx;
(void)file;
for (DataIdx = 0; DataIdx < len; DataIdx++) for (DataIdx = 0; DataIdx < len; DataIdx++)
{ {
@ -77,6 +80,7 @@ return len;
__attribute__((weak)) int _write(int file, char *ptr, int len) __attribute__((weak)) int _write(int file, char *ptr, int len)
{ {
int DataIdx; int DataIdx;
(void)file;
for (DataIdx = 0; DataIdx < len; DataIdx++) for (DataIdx = 0; DataIdx < len; DataIdx++)
{ {
@ -87,57 +91,71 @@ __attribute__((weak)) int _write(int file, char *ptr, int len)
int _close(int file) int _close(int file)
{ {
(void)file;
return -1; return -1;
} }
int _fstat(int file, struct stat *st) int _fstat(int file, struct stat *st)
{ {
(void)file;
st->st_mode = S_IFCHR; st->st_mode = S_IFCHR;
return 0; return 0;
} }
int _isatty(int file) int _isatty(int file)
{ {
(void)file;
return 1; return 1;
} }
int _lseek(int file, int ptr, int dir) int _lseek(int file, int ptr, int dir)
{ {
(void)file;
(void)ptr;
(void)dir;
return 0; return 0;
} }
int _open(char *path, int flags, ...) int _open(char *path, int flags, ...)
{ {
(void)path;
(void)flags;
/* Pretend like we always fail */ /* Pretend like we always fail */
return -1; return -1;
} }
int _wait(int *status) int _wait(int *status)
{ {
(void)status;
errno = ECHILD; errno = ECHILD;
return -1; return -1;
} }
int _unlink(char *name) int _unlink(char *name)
{ {
(void)name;
errno = ENOENT; errno = ENOENT;
return -1; return -1;
} }
int _times(struct tms *buf) int _times(struct tms *buf)
{ {
(void)buf;
return -1; return -1;
} }
int _stat(char *file, struct stat *st) int _stat(char *file, struct stat *st)
{ {
(void)file;
st->st_mode = S_IFCHR; st->st_mode = S_IFCHR;
return 0; return 0;
} }
int _link(char *old, char *new) int _link(char *old, char *new)
{ {
(void)old;
(void)new;
errno = EMLINK; errno = EMLINK;
return -1; return -1;
} }
@ -150,6 +168,9 @@ int _fork(void)
int _execve(char *name, char **argv, char **env) int _execve(char *name, char **argv, char **env)
{ {
(void)name;
(void)argv;
(void)env;
errno = ENOMEM; errno = ENOMEM;
return -1; return -1;
} }

View File

@ -537,6 +537,7 @@ uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
uint32_t linepos; uint32_t linepos;
uint32_t maskline; uint32_t maskline;
uint32_t offset; uint32_t offset;
(void)Edge;
/* Check parameters */ /* Check parameters */
assert_param(IS_EXTI_LINE(hexti->Line)); assert_param(IS_EXTI_LINE(hexti->Line));
@ -571,6 +572,7 @@ void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
__IO uint32_t *regaddr; __IO uint32_t *regaddr;
uint32_t maskline; uint32_t maskline;
uint32_t offset; uint32_t offset;
(void)Edge;
/* Check parameters */ /* Check parameters */
assert_param(IS_EXTI_LINE(hexti->Line)); assert_param(IS_EXTI_LINE(hexti->Line));