Compare commits

...

2 commits

3 changed files with 7 additions and 7 deletions

View file

@ -101,7 +101,7 @@ endif
# Debugging
#CFLAGS += -fsanitize=address -fPIC
#LDFLAGS += -lasan
#CFLAGS += -fanalyzer -flto
#CFLAGS += -fanalyzer -flto=auto
# Flags
CFLAGS += -Wall -Wextra -Wformat-security -funit-at-a-time -g -Og -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -std=c99 -D_POSIX_C_SOURCE=200809L # -Wconversion

View file

@ -156,7 +156,7 @@ struct dnpds40_cmd {
uint8_t arg1[6];
uint8_t arg2[16];
uint8_t arg3[8]; /* Decimal value of arg4's length, or empty */
uint8_t arg4[0]; /* Extra payload if arg3 is non-empty
uint8_t arg4[]; /* Extra payload if arg3 is non-empty
Doesn't have to be sent in the same URB */
/* All unused elements are set to 0x20 (ie ascii space) */

View file

@ -175,7 +175,7 @@ struct shinkos1245_cmd_tone {
struct {
uint8_t pad[5];
} end_data;
};
} data;
} __attribute__((packed));
#define TONE_CURVE_DATA_BLOCK_SIZE 64
@ -645,8 +645,8 @@ static int get_tonecurve(struct shinkos1245_ctx *ctx, int type, int table, char
cmd.tone[2] = 0x4e;
cmd.tone[3] = 0x45;
cmd.cmd2[0] = 0x72;
cmd.read_write.tone_table = type;
cmd.read_write.param_table = table;
cmd.data.read_write.tone_table = type;
cmd.data.read_write.param_table = table;
ret = shinkos1245_do_cmd(ctx, &cmd, sizeof(cmd),
&resp, sizeof(resp), &num);
@ -771,8 +771,8 @@ static int set_tonecurve(struct shinkos1245_ctx *ctx, int type, int table, char
cmd.tone[2] = 0x4e;
cmd.tone[3] = 0x45;
cmd.cmd2[0] = 0x77;
cmd.read_write.tone_table = type;
cmd.read_write.param_table = table;
cmd.data.read_write.tone_table = type;
cmd.data.read_write.param_table = table;
ret = shinkos1245_do_cmd(ctx, &cmd, sizeof(cmd),
&resp, sizeof(resp), &num);