Skip to content

Commit

Permalink
[media] media: venus: hfi_msgs: fix set but not used variables
Browse files Browse the repository at this point in the history
This fixes a warning found when building with gcc7:

drivers/media/platform/qcom/venus/hfi_msgs.c:465:40:
warning: variable 'domain' set but not used [-Wunused-but-set-variable]
  u32 rem_bytes, num_props, codecs = 0, domain = 0;
                                        ^~~~~~
drivers/media/platform/qcom/venus/hfi_msgs.c:465:28:
warning: variable 'codecs' set but not used [-Wunused-but-set-variable]
  u32 rem_bytes, num_props, codecs = 0, domain = 0;

The warning is avoided by deleting the variables declaration.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Stanimir Varbanov authored and Mauro Carvalho Chehab committed Jun 20, 2017
1 parent 4cb3548 commit 832d467
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/platform/qcom/venus/hfi_msgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ static u32 init_done_read_prop(struct venus_core *core, struct venus_inst *inst,
struct hfi_msg_session_init_done_pkt *pkt)
{
struct device *dev = core->dev;
u32 rem_bytes, num_props, codecs = 0, domain = 0;
u32 rem_bytes, num_props;
u32 ptype, next_offset = 0;
u32 err;
u8 *data;
Expand Down Expand Up @@ -490,8 +490,6 @@ static u32 init_done_read_prop(struct venus_core *core, struct venus_inst *inst,
(struct hfi_codec_mask_supported *)
(data + next_offset);

codecs = masks->codecs;
domain = masks->video_domains;
next_offset += sizeof(*masks);
num_props--;
break;
Expand Down

0 comments on commit 832d467

Please sign in to comment.