__u32 buttons;
__u8 wheel;
} __attribute__((packed)) *pad_report;
- int i, b;
+ int i;
+ size_t b;
__u8 modifiers = data[1];
__u32 buttons = 0;
if (data[3] != 0x06)
return 0;
- for (int idx = 0; idx < ARRAY_SIZE(offsets); idx++) {
+ for (size_t idx = 0; idx < ARRAY_SIZE(offsets); idx++) {
u8 offset = offsets[idx];
/* if Input (Cnst,Var,Abs) , make it Input (Data,Var,Abs) */
{
struct hid_bpf_ctx *hid_ctx;
__u16 pid;
- int i;
+ size_t i;
/* get a struct hid_device to access the actual pid of the device */
hid_ctx = hid_bpf_allocate_context(ctx->hid);
{
__u8 *data = hid_bpf_get_data(hctx, 0 /* offset */, 8 /* size */);
__u8 button_mask = 0;
- int d, b;
+ size_t d, b;
if (!data)
return 0; /* EPERM check */