History

connector: Fix invalid conversion in cn_proc.h

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

Matt Jan committed 2 years ago

Commit 06e785a1 parent 66ad4821 file · +1 −2Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/cn_proc.h+1−2
@@ -69,8 +69,7 @@ struct proc_input { · 68 unmodified lines
6969
7070 static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type)
7171 {
72− ev_type &= PROC_EVENT_ALL;
73− return ev_type;
72+ return (enum proc_cn_event)(ev_type & PROC_EVENT_ALL);
7473 }
7574
7675 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t