lkml.org 
[lkml]   [2001]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject2.4.9 highmem.h/bh_kmap raises "void*" warnings
Date
this code:

static inline char *bh_kmap(struct buffer_head *bh)

{

return kmap(bh->b_page) + bh_offset(bh);

}


static inline void *kmap(struct page *page) { return page_address(page); }

raises a "void* used in arithmetics" warning.

you might want to fix that by applying this
change to the critical line.

return (char*)kmap(bh->b_page) + bh_offset(bh);


of course not anybody does run their compiles with most warnings on,
but in order to reason my proposal, its better to explicitely
specify and fix the size of the elements than passing this size
decision over to the compiler designer.

regards AlexS

PS: i am not subscribed to this list.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.053 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site