Flexible I/O Tester development
 help / color / mirror / Atom feed
* gcc 5.1.1 and warnings when building fio on Linux with -flto
@ 2015-07-02 22:15 Bruce Cran
  2015-07-03 20:27 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Cran @ 2015-07-02 22:15 UTC (permalink / raw)
  To: fio@vger.kernel.org

Noticed the following warnings when building fio on Linux with gcc 5.1.1 
and -flto:

debug.h:38:22: warning: type of ‘fio_debug’ does not match original 
declaration
  extern unsigned long fio_debug;
                       ^
t/debug.c:5:14: note: previously declared here
  unsigned int fio_debug = 0;


lib/libmtd.c: In function ‘mtd_get_dev_info1’:
lib/libmtd.c:751:46: warning: passing argument 3 of ‘dev_read_data’ 
discards ‘const’ qualifier from pointer target type 
[-Wdiscarded-array-qualifiers]
   ret = dev_read_data(lib->mtd_name, mtd_num, &mtd->name,
                                               ^
lib/libmtd.c:184:12: note: expected ‘void *’ but argument is of type 
‘const char (*)[128]’
  static int dev_read_data(const char *patt, int mtd_num, void *buf, int 
buf_len)
             ^
lib/libmtd.c:757:46: warning: passing argument 3 of ‘dev_read_data’ 
discards ‘const’ qualifier from pointer target type 
[-Wdiscarded-array-qualifiers]
   ret = dev_read_data(lib->mtd_type, mtd_num, &mtd->type_str,
                                               ^
lib/libmtd.c:184:12: note: expected ‘void *’ but argument is of type 
‘const char (*)[65]’
  static int dev_read_data(const char *patt, int mtd_num, void *buf, int 
buf_len)


-- 
Bruce

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gcc 5.1.1 and warnings when building fio on Linux with -flto
  2015-07-02 22:15 gcc 5.1.1 and warnings when building fio on Linux with -flto Bruce Cran
@ 2015-07-03 20:27 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2015-07-03 20:27 UTC (permalink / raw)
  To: Bruce Cran, fio@vger.kernel.org

On 07/02/2015 04:15 PM, Bruce Cran wrote:
> Noticed the following warnings when building fio on Linux with gcc 5.1.1
> and -flto:
>
> debug.h:38:22: warning: type of ‘fio_debug’ does not match original
> declaration
>   extern unsigned long fio_debug;
>                        ^
> t/debug.c:5:14: note: previously declared here
>   unsigned int fio_debug = 0;

Fixed that one up.

> lib/libmtd.c: In function ‘mtd_get_dev_info1’:
> lib/libmtd.c:751:46: warning: passing argument 3 of ‘dev_read_data’
> discards ‘const’ qualifier from pointer target type
> [-Wdiscarded-array-qualifiers]
>    ret = dev_read_data(lib->mtd_name, mtd_num, &mtd->name,
>                                                ^
> lib/libmtd.c:184:12: note: expected ‘void *’ but argument is of type
> ‘const char (*)[128]’
>   static int dev_read_data(const char *patt, int mtd_num, void *buf, int
> buf_len)
>              ^
> lib/libmtd.c:757:46: warning: passing argument 3 of ‘dev_read_data’
> discards ‘const’ qualifier from pointer target type
> [-Wdiscarded-array-qualifiers]
>    ret = dev_read_data(lib->mtd_type, mtd_num, &mtd->type_str,
>                                                ^
> lib/libmtd.c:184:12: note: expected ‘void *’ but argument is of type
> ‘const char (*)[65]’
>   static int dev_read_data(const char *patt, int mtd_num, void *buf, int
> buf_len)

This one I know about, mtd is in need of some const cleaning. It is 
currently reading into const strings.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-03 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 22:15 gcc 5.1.1 and warnings when building fio on Linux with -flto Bruce Cran
2015-07-03 20:27 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox