編譯linux核心3.0系統出現的警告資訊(原創)

來源:互聯網
上載者:User

編譯linux核心3.0系統出現的警告資訊(原創)
餘超   yuchao86@gmail.com
[yuchao@yuchao-Latitude-E5410 linux-3.0]$gcc --version
gcc (GCC) 4.6.1
Copyright 2011 Free Software Foundation, Inc.
本程式是自由軟體;請參看原始碼的著作權聲明。本軟體沒有任何擔保;
包括沒有適銷性和某一專用目的下的適用性擔保。

========================================================================================
drivers/ata/sata_sil.c: 在函數‘sil_host_intr’中:
drivers/ata/sata_sil.c:453:14: 警告:此函數中的‘serror’在使用前可能未初始化 [-Wuninitialized]
=========================================================================================
drivers/block/drbd/drbd_main.c: 在函數‘drbd_buildtag’中:
drivers/block/drbd/drbd_main.c:4187:19: 警告:the comparison will always evaluate as ‘true’ for the address of ‘__this_module’ will never be NULL [-Waddress]
  CC [M]  drivers/block/drbd/drbd_strings.o
=========================================================================================
  CC [M]  drivers/block/DAC960.o
drivers/block/DAC960.c: 在函數‘DAC960_V2_ProcessCompletedCommand’中:
drivers/block/DAC960.c:5095:30: 警告:在‘DAC960_V2_IOCTL_Opcode_T’和‘enum <匿名>’間比較 [-Wenum-compare]
drivers/block/DAC960.c: 在函數‘DAC960_V1_EnableMemoryMailboxInterface’中:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/io.h:63:1: 警告:此函數中的‘CommandMailbox.Bytes[12]’在使用前可能未初始化 [-Wuninitialized]
drivers/block/DAC960.c:1175:30: 附註:‘CommandMailbox.Bytes[12]’在此聲明
================================================================================================================================

在函數‘copy_from_user’中,
    內聯自‘parse_command.part.1’於 fs/binfmt_misc.c:422:20:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess_32.h:211:26: 警告:調用‘copy_from_user_overflow’,聲明有警告屬性:copy_from_user() buffer size is not provably correct [預設啟用]

arch/x86/kvm/emulate.c: 在函數‘emulate_sysexit’中:
arch/x86/kvm/emulate.c:2054:9: 警告:此函數中的‘ss_sel’在使用前可能未初始化 [-Wuninitialized]
arch/x86/kvm/emulate.c:2053:9: 警告:此函數中的‘cs_sel’在使用前可能未初始化 [-Wuninitialized]

/home/yuchao/dev/linux-3.0/arch/x86/include/asm/bitops.h: 在函數‘can_boost.part.7’中:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/bitops.h:319:2: 警告:不建議在 asm 運算元 1 中不帶左值地使用記憶體輸入 [預設啟用]

WARNING: drivers/eisa/built-in.o(.data+0xd0): Section mismatch in reference from the variable pci_eisa_driver to the function .init.text:pci_eisa_init()
The variable pci_eisa_driver references
the function __init pci_eisa_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/gpu/drm/radeon/radeon.o(.text+0x4435b): Section mismatch in reference from the function radeon_get_clock_info() to the function .devinit.text:radeon_read_clocks_OF()
The function radeon_get_clock_info() references
the function __devinit radeon_read_clocks_OF().
This is often because radeon_get_clock_info lacks a __devinit 
annotation or the annotation of radeon_read_clocks_OF is wrong.

  CC [M]  drivers/gpu/drm/nouveau/nv50_display.o
drivers/gpu/drm/nouveau/nv50_display.c: 在函數‘nv50_display_unk10_handler’中:
drivers/gpu/drm/nouveau/nv50_display.c:628:15: 警告:此函數中的‘or’在使用前可能未初始化 [-Wuninitialized]
drivers/gpu/drm/nouveau/nv50_display.c: 在函數‘nv50_display_unk20_handler’中:
drivers/gpu/drm/nouveau/nv50_display.c:751:15: 警告:此函數中的‘or’在使用前可能未初始化 [-Wuninitialized]
  CC [M]  drivers/gpu/drm/nouveau/nv04_dac.o

drivers/hwmon/applesmc.c: 在函數‘applesmc_get_entry_by_key’中:
drivers/hwmon/applesmc.c:390:10: 警告:此函數中的‘end’在使用前可能未初始化 [-Wuninitialized]
  CC [M]  drivers/hwmon/asc7621.o
drivers/infiniband/hw/mlx4/qp.c: 在函數‘build_mlx_header’中:
drivers/infiniband/hw/mlx4/qp.c:1379:30: 警告:此函數中的‘vlan’在使用前可能未初始化 [-Wuninitialized]
In file included from /home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess.h:570:0,
                 from include/net/checksum.h:25,
                 from include/linux/skbuff.h:28,
                 from drivers/isdn/hardware/avm/b1.c:17:
在函數‘copy_from_user’中,
    內聯自‘b1_load_t4file’於 drivers/isdn/hardware/avm/b1.c:179:22:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess_32.h:211:26: 警告:調用‘copy_from_user_overflow’,聲明有警告屬性:copy_from_user() buffer size is not provably correct [預設啟用]
在函數‘copy_from_user’中,
    內聯自‘b1_load_config’於 drivers/isdn/hardware/avm/b1.c:227:22:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess_32.h:211:26: 警告:調用‘copy_from_user_overflow’,聲明有警告屬性:copy_from_user() buffer size is not provably correct [預設啟用]
  CC [M]  drivers/isdn/hardware/avm
  
  drivers/isdn/hardware/eicon/message.c: 在函數‘mixer_notify_update’中:
drivers/isdn/hardware/eicon/message.c:11308:54: 警告:數組下標大於數組邊界 [-Warray-bounds]

drivers/isdn/hardware/mISDN/hfcpci.c: 在函數‘hfcpci_softirq’中:
drivers/isdn/hardware/mISDN/hfcpci.c:2318:2: 警告:忽略聲明有 warn_unused_result 屬性的‘driver_for_each_device’的傳回值 [-Wunused-result]
===============================================================================
  CC [M]  drivers/media/dvb/dvb-core/dvb_ca_en50221.o
In file included from /home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess.h:570:0,
                 from include/linux/poll.h:14,
                 from drivers/media/dvb/dvb-core/dvbdev.h:27,
                 from drivers/media/dvb/dvb-core/dvb_ca_en50221.h:27,
                 from drivers/media/dvb/dvb-core/dvb_ca_en50221.c:41:
在函數‘copy_from_user’中,
    內聯自‘dvb_ca_en50221_io_write’於 drivers/media/dvb/dvb-core/dvb_ca_en50221.c:1314:26:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess_32.h:211:26: 警告:調用‘copy_from_user_overflow’,聲明有警告屬性:copy_from_user() buffer size is not provably correct [預設啟用]

==================================================================
drivers/media/common/tuners/max2165.c: 在函數‘max2165_set_rf’中:
drivers/media/common/tuners/max2165.c:203:11: 警告:此函數中的‘fraction’在使用前可能未初始化 [-Wuninitialized]
drivers/media/common/tuners/max2165.c:205:19: 警告:此函數中的‘quotient’在使用前可能未初始化 [-Wuninitialized]
=======================================================================================================

==================================================================================================================
drivers/isdn/sc/init.c: 在函數‘identify_board’中:
drivers/isdn/sc/init.c:487:2: 警告:傳遞‘readl’的第 1 個參數時將整數賦給指標,未作類型轉換 [預設啟用]
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/io.h:57:1: 附註:需要類型‘const volatile void *’,但實參的類型為‘long unsigned int’
drivers/isdn/sc/init.c:497:2: 警告:傳遞‘readl’的第 1 個參數時將整數賦給指標,未作類型轉換 [預設啟用]
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/io.h:57:1: 附註:需要類型‘const volatile void *’,但實參的類型為‘long unsigned int’
drivers/isdn/sc/init.c:507:2: 警告:傳遞‘readl’的第 1 個參數時將整數賦給指標,未作類型轉換 [預設啟用]
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/io.h:57:1: 附註:需要類型‘const volatile void *’,但實參的類型為‘long unsigned int’
=============================================================================================================================
drivers/isdn/icn/icn.c: 在函數‘icn_sendbuf’中:
drivers/isdn/icn/icn.c:721:4: 警告:#warning TODO test headroom or use skb->nb to flag ACK [-Wcpp]
In file included from /home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess.h:570:0,
                 from include/net/checksum.h:25,
                 from include/linux/skbuff.h:28,
                 from include/linux/isdnif.h:57,
                 from drivers/isdn/icn/icn.h:51,
                 from drivers/isdn/icn/icn.c:12:
在函數‘copy_from_user’中,
    內聯自‘icn_writecmd’於 drivers/isdn/icn/icn.c:1048:22:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess_32.h:211:26: 警告:調用‘copy_from_user_overflow’,聲明有警告屬性:copy_from_user() buffer size is not provably correct [預設啟用]
===============================================================================================================================
drivers/isdn/hardware/mISDN/hfcpci.c: 在函數‘hfcpci_softirq’中:
drivers/isdn/hardware/mISDN/hfcpci.c:2318:2: 警告:忽略聲明有 warn_unused_result 屬性的‘driver_for_each_device’的傳回值 [-Wunused-result]
==============================================================================================================
drivers/isdn/hardware/eicon/message.c: 在函數‘mixer_notify_update’中:
drivers/isdn/hardware/eicon/message.c:11308:54: 警告:數組下標大於數組邊界 [-Warray-bounds]
In file included from /home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess.h:570:0,
                 from include/net/checksum.h:25,
                 from include/linux/skbuff.h:28,
                 from drivers/isdn/hardware/avm/b1.c:17:
在函數‘copy_from_user’中,
    內聯自‘b1_load_t4file’於 drivers/isdn/hardware/avm/b1.c:179:22:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess_32.h:211:26: 警告:調用‘copy_from_user_overflow’,聲明有警告屬性:copy_from_user() buffer size is not provably correct [預設啟用]
在函數‘copy_from_user’中,
    內聯自‘b1_load_config’於 drivers/isdn/hardware/avm/b1.c:227:22:
/home/yuchao/dev/linux-3.0/arch/x86/include/asm/uaccess_32.h:211:26: 警告:調用‘copy_from_user_overflow’,聲明有警告屬性:copy_from_user() buffer size is not provably correct [預設啟用]
===========================================================================================
WARNING: drivers/mfd/built-in.o(.data+0x24cc): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
The variable ab3550_driver references
the function __init ab3550_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

++++++++++++++++++++++++++++++++
WARNING: drivers/net/phy/built-in.o(.init.text+0x4c2): Section mismatch in reference from the function mdio_gpio_init() to the function .exit.text:mdio_ofgpio_exit()
The function __init mdio_gpio_init() references
a function __exit mdio_ofgpio_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
mdio_ofgpio_exit() so it may be used outside an exit section.

==================================================================
drivers/misc/lkdtm.c: 在函數‘recursive_loop.constprop.2’中:
drivers/misc/lkdtm.c:276:1: 警告:棧幀有 1028 位元組,超過了 1024 位元組 [-Wframe-larger-than=]
==================================================================
In file included from drivers/net/tokenring/smctr.c:43:0:
include/linux/mca-legacy.h:12:2: 警告:#warning "MCA legacy - please move your driver to the new sysfs api" [-Wcpp]
include/linux/mtd/map.h:330:11: 警告:此函數中的‘r.x[0]’在使用前可能未初始化 [-Wuninitialized]

=======================================================================
drivers/net/pcmcia/nmclan_cs.c: 在函數‘nmclan_config’中:
drivers/net/pcmcia/nmclan_cs.c:628:3: 警告:不建議使用‘pcmcia_request_exclusive_irq’(聲明於 include/pcmcia/ds.h:201) [-Wdeprecated-declarations]
drivers/net/pcmcia/ibmtr_cs.c: 在函數‘ibmtr_config’中:
drivers/net/pcmcia/ibmtr_cs.c:195:5: 警告:不建議使用‘pcmcia_request_exclusive_irq’(聲明於 include/pcmcia/ds.h:201) [-Wdeprecated-declarations]
========================================================

drivers/net/wan/cycx_x25.c: 在函數‘hex_dump’中:
drivers/net/wan/cycx_x25.c:1030:1: 警告:棧幀有 1040 位元組,超過了 1024 位元組 [-Wframe-larger-than=]
drivers/net/wireless/prism54/isl_ioctl.c: 在函數‘prism54_hostapd’中:
drivers/net/wireless/prism54/isl_ioctl.c:2733:14: 警告:數組下標大於數組邊界 [-Warray-bounds]
drivers/net/wireless/airo.c: 在函數‘encapsulate’中:
drivers/net/wireless/airo.c:1421:15: 警告:數組下標大於數組邊界 [-Warray-bounds]
drivers/net/wireless/ray_cs.c: 在函數‘rx_authenticate.isra.13’中:
drivers/net/wireless/ray_cs.c:2439:15: 警告:數組下標大於數組邊界 [-Warray-bounds]
drivers/net/cnic.c: 在函數‘cnic_cm_open’中:
drivers/net/cnic.c:4047:2: 警告:the comparison will always evaluate as ‘true’ for the address of ‘cm_ulp_ops’ will never be NULL [-Waddress]
drivers/net/cnic.c: 在函數‘cnic_start_bnx2_hw’中:
drivers/net/cnic.c:4556:1: 警告:棧幀有 1168 位元組,超過了 1024 位元組 [-Wframe-larger-than=]
drivers/scsi/aic94xx/aic94xx_sds.c:597:21: 警告:此函數中的‘offs’在使用前可能未初始化 [-Wuninitialized]
drivers/scsi/libsas/sas_ata.c:80:3: 警告:case 值‘2’不在枚舉類型‘enum exec_status’內 [-Wswitch]
drivers/scsi/lpfc/lpfc_bsg.c:1662:5: 警告:此函數中的‘mbxstatus’在使用前可能未初始化 [-Wuninitialized]
drivers/staging/comedi/drivers/pcmmio.c:498:22: 警告:數組下標大於數組邊界 [-Warray-bounds]
drivers/staging/comedi/drivers/pcmmio.c:561:37: 警告:此函數中的‘irq[1]’在使用前可能未初始化 [-Wuninitialized]
drivers/staging/comedi/drivers/vmk80xx.c: 在函數‘vmk80xx_cnt_rinsn’中:
drivers/staging/comedi/drivers/vmk80xx.c:995:37: 警告:此函數中的‘reg[0]’在使用前可能未初始化 [-Wuninitialized]
drivers/staging/iio/industrialio-core.c: 在函數‘iio_device_add_event_sysfs.isra.3’中:
drivers/staging/iio/industrialio-core.c:925:7: 警告:此函數中的‘mask’在使用前可能未初始化 [-Wuninitialized]
drivers/telephony/ixj.c: 在函數‘add_caps’中:
drivers/telephony/ixj.c:5930:38: 警告:‘j->caps’上的運算結果可能是未定義的 [-Wsequence-point]

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.