added checks to trick the gcc4 compiler. this way the label is kept.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20380 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -587,6 +587,10 @@ arch_cpu_user_memcpy(void *to, const void *from, size_t size, addr_t *faultHandl
|
|||||||
char *tmp = (char *)to;
|
char *tmp = (char *)to;
|
||||||
char *s = (char *)from;
|
char *s = (char *)from;
|
||||||
|
|
||||||
|
// this check is to trick the gcc4 compiler and have it keep the error label
|
||||||
|
if (to == NULL)
|
||||||
|
goto error;
|
||||||
|
|
||||||
*faultHandler = (addr_t)&&error;
|
*faultHandler = (addr_t)&&error;
|
||||||
|
|
||||||
while (size--)
|
while (size--)
|
||||||
@@ -606,6 +610,10 @@ arch_cpu_user_strlcpy(char *to, const char *from, size_t size, addr_t *faultHand
|
|||||||
{
|
{
|
||||||
int fromLength = 0;
|
int fromLength = 0;
|
||||||
|
|
||||||
|
// this check is to trick the gcc4 compiler and have it keep the error label
|
||||||
|
if (to == NULL)
|
||||||
|
goto error;
|
||||||
|
|
||||||
*faultHandler = (addr_t)&&error;
|
*faultHandler = (addr_t)&&error;
|
||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
@@ -635,6 +643,10 @@ arch_cpu_user_memset(void *s, char c, size_t count, addr_t *faultHandler)
|
|||||||
{
|
{
|
||||||
char *xs = (char *)s;
|
char *xs = (char *)s;
|
||||||
|
|
||||||
|
// this check is to trick the gcc4 compiler and have it keep the error label
|
||||||
|
if (s == NULL)
|
||||||
|
goto error;
|
||||||
|
|
||||||
*faultHandler = (addr_t)&&error;
|
*faultHandler = (addr_t)&&error;
|
||||||
|
|
||||||
while (count--)
|
while (count--)
|
||||||
|
|||||||
Reference in New Issue
Block a user