The implicit conversion from unsigned int to enum proc_cn_event is invalid, so explicitly cast it for compilation in a C++ compiler. /usr/include/linux/cn_proc.h: In function 'proc_cn_event valid_event(proc_cn_event)': /usr/include/linux/cn_proc.h:72:17: error: invalid conversion from 'unsigned int' to 'proc_cn_event' [-fpermissive] 72 | ev_type &= PROC_EVENT_ALL; | ^ | | | unsigned int
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -69,8 +69,7 @@ struct proc_input { · 68 unmodified lines | |||
| 69 | 69 | ||
| 70 | static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type) | 70 | static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type) |
| 71 | { | 71 | { |
| 72 | ev_type &= PROC_EVENT_ALL; | 72 | return (enum proc_cn_event)(ev_type & PROC_EVENT_ALL); |
| 73 | return ev_type; | ||
| 74 | } | 73 | } |
| 75 | 74 | ||
| 76 | /* | 75 | /* |