[Devel] filemap.c: interesting check around zero_length_segment:

Alexey Dobriyan adobriyan at sw.ru
Fri Jun 29 00:56:32 PDT 2007


Adding -W -Wno-stupid-warnings results in the following warning:

mm/filemap.c: In function 'generic_file_buffered_write':
mm/filemap.c:2179: warning: comparison of unsigned expression >= 0 is always true

		if (likely(copied >= 0)) {
			if (!status)
				status = copied;

Branch is always taken since "copied" is size_t.

Such code doesn't exist in -mm, but is this something to worry about for
current and older kernels?




More information about the Devel mailing list