Project

General

Profile

Actions

Bug #5655

open

Redefinition of local variable

Added by Vadim Mutilin about 9 years ago. Updated about 8 years ago.

Status:
Open
Priority:
High
Category:
C back-end
Start date:
02/24/2015
Due date:
% Done:

0%

Estimated time:
Detected in build:
70c7ddb
Platform:
Published in build:

Description

In function probe, varible len originally declared once
http://lxr.free-electrons.com/source/drivers/video/fbdev/via/via_aux_vt1632.c?v=3.17#L38

 38         const u8 id[] = {0x06, 0x11, 0x92, 0x31}, len = ARRAY_SIZE(id);

is printed two times by CIF

static void probe(struct via_aux_bus *bus, u8 addr)
{
  struct via_aux_drv drv = { . bus = bus , . addr = addr , . name = name };
# 39 "drivers/video/fbdev/via/via_aux_vt1632.c" 
  u8 const id[4U] = { [ 0U ] = 6U , [ 1U ] = 17U , [ 2U ] = 146U , [ 3U ] = 49U };
# 39 "drivers/video/fbdev/via/via_aux_vt1632.c" 
  u8 const len = 4U;
  struct
  {
    signed char;
  };
# 40 "drivers/video/fbdev/via/via_aux_vt1632.c" 
  u8 tmp[( long unsigned int ) ( ( long int ) len + 0L )];
# 39 "drivers/video/fbdev/via/via_aux_vt1632.c" 
  u8 const len = 4U;
# 42 "drivers/video/fbdev/via/via_aux_vt1632.c" 
  if (( int ) ! ( _Bool ) via_aux_read ( & drv , 0 , ( u8 *) & tmp , ( int ) len ) || memcmp ( ( void const *) & id , ( void const *) & tmp , ( size_t ) len ) != 0)
    return;
# 45 "drivers/video/fbdev/via/via_aux_vt1632.c" 
  printk ( ( char const *) "\16viafb: Found %s at address 0x%x\n" , name , ( int ) addr );
  via_aux_add ( & drv );
}

GCC prints error message

drivers/video/fbdev/via/via_aux_vt1632.c: In function 'probe':
drivers/video/fbdev/via/via_aux_vt1632.c:39:12: error: redefinition of 'len'
drivers/video/fbdev/via/via_aux_vt1632.c:39:12: note: previous definition of 'len' was here

Appeared for linux-3.17-rc1.tar.xz, 32_7a

Actions #1

Updated by Evgeny Novikov about 9 years ago

  • Status changed from New to Open
  • Assignee set to Evgeny Novikov
Actions #2

Updated by Evgeny Novikov about 8 years ago

  • Category set to C back-end
  • Priority changed from Normal to High
Actions

Also available in: Atom PDF