lib: posix: Explicitly ignoring return of memcpy
According with MISRA-C the value returned by a non-void function has to be used. As memcpy return is almost useless, we are explicitly ignoring it. MISRA-C rule 17.7 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
8f3459b3db
commit
17c7db6bbe
2 changed files with 2 additions and 2 deletions
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue