mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling 1. Add semaphore uninterruptible wait function 2 .Replace semaphore wait loop with a single uninterruptible wait 3. Replace all sem_xxx to nxsem_xxx * Unify the void cast usage 1. Remove void cast for function because many place ignore the returned value witout cast 2. Replace void cast for variable with UNUSED macro
This commit is contained in:
@@ -169,7 +169,7 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize)
|
||||
return OK;
|
||||
|
||||
errout_with_addrenv:
|
||||
(void)up_addrenv_destroy(&loadinfo->addrenv);
|
||||
up_addrenv_destroy(&loadinfo->addrenv);
|
||||
loadinfo->addrenv = 0;
|
||||
|
||||
errout_with_dspace:
|
||||
|
||||
@@ -475,7 +475,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
|
||||
{
|
||||
berr("Exported symbol \"%s\" not found\n", symname);
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
(void)nxflat_addrenv_restore(loadinfo);
|
||||
nxflat_addrenv_restore(loadinfo);
|
||||
#endif
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@@ -215,9 +215,9 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
|
||||
|
||||
errout:
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
(void)nxflat_addrenv_restore(loadinfo);
|
||||
nxflat_addrenv_restore(loadinfo);
|
||||
#endif
|
||||
(void)nxflat_unload(loadinfo);
|
||||
nxflat_unload(loadinfo);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user