ipc/shm: Use ERR_CAST to return error code
PATCH 1/1 ipc/shm: Use ERR_CAST to return error code
Fix gcc warning:ipc/shm.c: In function 'shm_lock'ipc/shm.c:210:2: note: randstruct: casting between randomized structure pointer types (ssa): 'struct shmid_kernel' and 'struct kern_ipc_perm'
Signed-off-by YueHaibing <[email protected]>
--- ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ipc/shm.c +1 -1
@@ -206,7 +206,7 @@ static inline struct shmid_kernel *shm_lock(struct ipc_namespace *ns, int id)* Callers of shm_lock() must validate the status of the returned ipc * object pointer and error out as appropriate. */ -return (void *)ipcp; +return ERR_CAST (ipcp); }static inline void shm_lock_by_ptr (struct shmid_kernel *ipcp)
Signature · 1 line
1.8.3.1