Skip to content

Commit

Permalink
V4L/DVB (12107): smscoreapi: fix compile warning
Browse files Browse the repository at this point in the history
gcc 4.3.1 generates this warning:

v4l/smscoreapi.c: In function 'smscore_gpio_configure':
v4l/smscoreapi.c:1481: warning: 'GroupNum' may be used uninitialized in this function
v4l/smscoreapi.c:1480: warning: 'TranslatedPinNum' may be used uninitialized in this function

While in practice this will not happen, it is something that the compiler
can't determine. Initializing these two local variables to 0 suppresses
this warning.

Cc: Udi Atar <udi.linuxtv@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jun 23, 2009
1 parent c6711c3 commit be5daa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/dvb/siano/smscoreapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,8 +1422,8 @@ int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
struct smscore_gpio_config *pGpioConfig) {

u32 totalLen;
u32 TranslatedPinNum;
u32 GroupNum;
u32 TranslatedPinNum = 0;
u32 GroupNum = 0;
u32 ElectricChar;
u32 groupCfg;
void *buffer;
Expand Down

0 comments on commit be5daa9

Please sign in to comment.