diff --git a/lib/posix/fs.c b/lib/posix/fs.c index 87efba07b50..5c621de7574 100644 --- a/lib/posix/fs.c +++ b/lib/posix/fs.c @@ -250,7 +250,7 @@ struct dirent *readdir(DIR *dirp) rc = strlen(fdirent.name); rc = (rc < PATH_MAX) ? rc : (PATH_MAX - 1); - memcpy(pdirent.d_name, fdirent.name, rc); + (void)memcpy(pdirent.d_name, fdirent.name, rc); /* Make sure the name is NULL terminated */ pdirent.d_name[rc] = '\0'; diff --git a/lib/posix/pthread.c b/lib/posix/pthread.c index 0eda809476a..a141babc8c4 100644 --- a/lib/posix/pthread.c +++ b/lib/posix/pthread.c @@ -283,7 +283,7 @@ int pthread_attr_init(pthread_attr_t *attr) return ENOMEM; } - memcpy(attr, &init_pthread_attrs, sizeof(pthread_attr_t)); + (void)memcpy(attr, &init_pthread_attrs, sizeof(pthread_attr_t)); return 0; }