diff packages/hal/common/current/src/thread-packets.c @ 2595:3ea2b2f69262

* src/thread-packets.c (threadmatch): Silence pointer signedness warning. (threadref_to_int): Ditto. * src/generic-stub.c (__mem2hex): Ditto. (__mem2hex_safe): Ditto. (__hex2mem): Ditto. (__hex2mem_safe): Ditto. * src/hal_if.c (delay_us): Ditto. * include/hal_stub.h (CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION): Instead of using a local variable to avoid compiler reordering when taking the address of a label, instead call an external function. (NB making the variable volatile isn't sufficient). * cdl/hal.cdl: Work around problem with current ARM EABI tools by using /dev/null as linker script. Should be safe with other tools. * src/hal_if.c (delay_us): use HAL_DELAY_US() rather than the fancy implementation if the port cannot provide HAL_CLOCK_READ() * cdl/common.cdl: Add CYGBLD_HAL_LINKER_GROUPED_LIBS to allow CDL setting of libraries used for GROUP() directive in linker script.
author jlarmour
date Tue, 11 Nov 2008 04:28:57 +0000
parents d2c90368aeef
children 74dbf4c3f2e1
line wrap: on
line diff
--- a/packages/hal/common/current/src/thread-packets.c
+++ b/packages/hal/common/current/src/thread-packets.c
@@ -9,6 +9,7 @@
 // -------------------------------------------
 // This file is part of eCos, the Embedded Configurable Operating System.
 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2008 eCosCentric Limited.
 //
 // eCos is free software; you can redistribute it and/or modify it under
 // the terms of the GNU General Public License as published by the Free
@@ -403,7 +404,7 @@ static int threadref_to_int(threadref * 
   unsigned char * scan ;
   int i ;
   
-  scan = (char *) ref ;
+  scan = (unsigned char *) ref ;
   scan += 4 ;
   i = 4 ;
   while (i-- > 0) value = (value << 8) | ((*scan++) & 0xff) ;
@@ -428,8 +429,8 @@ int threadmatch(
 {
   unsigned char * srcp, * destp ;
   int i , result ;
-  srcp = (char *) src ;
-  destp = (char *) dest ;
+  srcp = (unsigned char *) src ;
+  destp = (unsigned char *) dest ;
   i = 8 ;
   result = 1 ;
   while (i-- > 0 ) result &= (*srcp++ == *destp++) ? 1 : 0 ;