소스 검색

[media] lirc: silence some compile warnings

Both lirc_imon and lirc_sasem were causing gcc to complain about the
possible use of uninitialized variables.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson 14 년 전
부모
커밋
55734785cd
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      drivers/staging/lirc/lirc_imon.c
  2. 1 1
      drivers/staging/lirc/lirc_sasem.c

+ 1 - 1
drivers/staging/lirc/lirc_imon.c

@@ -379,7 +379,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
 	struct imon_context *context;
 	const unsigned char vfd_packet6[] = {
 		0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
-	int *data_buf;
+	int *data_buf = NULL;
 
 	context = file->private_data;
 	if (!context) {

+ 1 - 1
drivers/staging/lirc/lirc_sasem.c

@@ -364,7 +364,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
 	int i;
 	int retval = 0;
 	struct sasem_context *context;
-	int *data_buf;
+	int *data_buf = NULL;
 
 	context = (struct sasem_context *) file->private_data;
 	if (!context) {