pre-2.1.89-3 warnings in string.h

David Woodhouse (Dave@imladris.demon.co.uk)
Fri, 27 Feb 1998 23:19:48 +0000


This is a multipart MIME message.

--==_Exmh_-2653582520
Content-Type: text/plain; charset=us-ascii

Most files in the kernel I just compiled complained along these lines:

/usr/src/linux/include/asm/string.h: In function `__constant_memcpy':
In file included from /usr/src/linux/include/linux/string.h:39,
from awe_wave.c:29:
/usr/src/linux/include/asm/string.h:448: warning: control reaches end of non-void function
/usr/src/linux/include/asm/string.h: In function `__constant_c_and_count_memset':
/usr/src/linux/include/asm/string.h:599: warning: control reaches end of non-void function

The attached patch fixes it.

--==_Exmh_-2653582520
Content-Type: text/plain; name="string.h.diff"; charset=us-ascii
Content-Description: string.h.diff
Content-Disposition: attachment; filename="string.h.diff"

--- linux/include/asm/string.h.orig Fri Feb 27 23:14:41 1998
+++ linux/include/asm/string.h Fri Feb 27 23:16:54 1998
@@ -442,7 +442,7 @@
case 0: COMMON(""); return to;
case 1: COMMON("\n\tmovsb"); return to;
case 2: COMMON("\n\tmovsw"); return to;
- case 3: COMMON("\n\tmovsw\n\tmovsb"); return to;
+ default: COMMON("\n\tmovsw\n\tmovsb"); return to;
}
#undef COMMON
}
@@ -593,7 +593,7 @@
case 0: COMMON(""); return s;
case 1: COMMON("\n\tstosb"); return s;
case 2: COMMON("\n\tstosw"); return s;
- case 3: COMMON("\n\tstosw\n\tstosb"); return s;
+ default: COMMON("\n\tstosw\n\tstosb"); return s;
}
#undef COMMON
}

--==_Exmh_-2653582520
Content-Type: text/plain; charset=us-ascii

---- ---- ----
David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355
Dave@imladris.demon.co.uk http://dwmw2.robinson.cam.ac.uk
finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.

--==_Exmh_-2653582520--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu