Skip to content

Commit

Permalink
V4L/DVB (6070): Fix a warning at dvb_net
Browse files Browse the repository at this point in the history
static function dvb_net_sec declares input arg "pkt" as u8. However, the
same argument at dvb_net_sec_callback is defined as "const u8". When
calling dvb_net_sec, this is casted as just "u8".

gcc 4.2.1 generates a warning about that:

  CC [M]  drivers/media/dvb/dvb-core/dvb_net.o
drivers/media/dvb/dvb-core/dvb_net.c: In function "dvb_net_sec_callback":
drivers/media/dvb/dvb-core/dvb_net.c:905: warning: passing argument 2 of
		"dvb_net_sec" discards qualifiers from pointer target type

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Aug 23, 2007
1 parent 6175e48 commit 04b35ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/media/dvb/dvb-core/dvb_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,8 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
}


static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
static void dvb_net_sec(struct net_device *dev, const u8 *pkt, int
pkt_len)
{
u8 *eth;
struct sk_buff *skb;
Expand Down Expand Up @@ -902,7 +903,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
* we rely on the DVB API definition where exactly one complete
* section is delivered in buffer1
*/
dvb_net_sec (dev, (u8*) buffer1, buffer1_len);
dvb_net_sec (dev, buffer1, buffer1_len);
return 0;
}

Expand Down

0 comments on commit 04b35ab

Please sign in to comment.