Project

General

Profile

Actions

Bug #5282

open

Incompatible types when assigning to type ‘struct <anonymous>’ from type ‘struct <anonymous>’

Added by Vadim Mutilin about 10 years ago. Updated almost 9 years ago.

Status:
Open
Priority:
High
Category:
C back-end
Start date:
09/19/2014
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

For the driver
linux-3.17-rc1.tar.xz 32_7a drivers/scsi/lpfc/lpfc.ko

CIF generates code (function lpfc_get_hba_model_desc):

  switch (( int ) dev_id)
  {
# 2067 "drivers/scsi/lpfc/lpfc_init.o.c.prepared" 
    case 6885:;
    m = ( struct
    {
# 2040 "drivers/scsi/lpfc/lpfc_init.o.c.prepared" 
      char *name;
      char *bus;
      char *function;
    } ) { . name =
# 2068 "drivers/scsi/lpfc/lpfc_init.o.c.prepared" 
    ( char *) "LP6000" , . bus = ( char *) "PCI" , . function =
# 2069 "drivers/scsi/lpfc/lpfc_init.o.c.prepared" 
    ( char *) "Obsolete, Unsupported Fibre Channel Adapter" };

GCC fails to compile it

drivers/scsi/lpfc/lpfc_init.o.c.prepared: In function ‘lpfc_get_hba_model_desc’:
drivers/scsi/lpfc/lpfc_init.o.c.prepared:2068:7: error: incompatible types when assigning to type ‘struct <anonymous>’ from type ‘struct <anonymous>’

Original code

         switch (dev_id) {
         case PCI_DEVICE_ID_FIREFLY:
                 m = (typeof(m)){"LP6000", "PCI",
                                 "Obsolete, Unsupported Fibre Channel Adapter"};

Actions

Also available in: Atom PDF