summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-05 19:37:28 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-05 19:37:28 +0000
commitf16a6fe73a77b1ebdc962f0639289b8a7e05ae6e (patch)
tree0509b359198624a4640c0831667674640ff3fffa /cpukit
parent2009-05-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-f16a6fe73a77b1ebdc962f0639289b8a7e05ae6e.tar.bz2
2009-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/heap.h, score/inline/rtems/score/address.inl, score/inline/rtems/score/heap.inl, score/inline/rtems/score/object.inl, score/inline/rtems/score/priority.inl, score/inline/rtems/score/tod.inl: Remove warnings.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog9
-rw-r--r--cpukit/score/include/rtems/score/heap.h2
-rw-r--r--cpukit/score/inline/rtems/score/address.inl2
-rw-r--r--cpukit/score/inline/rtems/score/heap.inl4
-rw-r--r--cpukit/score/inline/rtems/score/object.inl2
-rw-r--r--cpukit/score/inline/rtems/score/priority.inl2
-rw-r--r--cpukit/score/inline/rtems/score/tod.inl8
7 files changed, 21 insertions, 8 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 4dcbde6c2a..f3f9b57847 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,12 @@
+2009-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * score/include/rtems/score/heap.h,
+ score/inline/rtems/score/address.inl,
+ score/inline/rtems/score/heap.inl,
+ score/inline/rtems/score/object.inl,
+ score/inline/rtems/score/priority.inl,
+ score/inline/rtems/score/tod.inl: Remove warnings.
+
2009-05-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/include/rtems/system.h: Added
diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h
index 7418e0c1ea..30d1bd6846 100644
--- a/cpukit/score/include/rtems/score/heap.h
+++ b/cpukit/score/include/rtems/score/heap.h
@@ -100,7 +100,7 @@ struct Heap_Block_struct {
* to store the flag.
*/
-#define HEAP_PREV_USED 1 /* indicates previous block is in use */
+#define HEAP_PREV_USED 1u /* indicates previous block is in use */
/**
* The following constants reflect various requirements of the
diff --git a/cpukit/score/inline/rtems/score/address.inl b/cpukit/score/inline/rtems/score/address.inl
index 2efab75df0..b0e418e647 100644
--- a/cpukit/score/inline/rtems/score/address.inl
+++ b/cpukit/score/inline/rtems/score/address.inl
@@ -81,7 +81,7 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset (
* @note The cast of an address to an uint32_t makes this code
* dependent on an addresses being thirty two bits.
*/
-RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract (
+RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
void *left,
void *right
)
diff --git a/cpukit/score/inline/rtems/score/heap.inl b/cpukit/score/inline/rtems/score/heap.inl
index 09d6e5b0cd..b8bb124423 100644
--- a/cpukit/score/inline/rtems/score/heap.inl
+++ b/cpukit/score/inline/rtems/score/heap.inl
@@ -376,11 +376,11 @@ RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in (
* @return This method returns the total amount of memory
* allocated to the heap.
*/
-RTEMS_INLINE_ROUTINE uint32_t _Heap_Get_size (
+RTEMS_INLINE_ROUTINE int32_t _Heap_Get_size (
Heap_Control *the_heap
)
{
- return the_heap->end - the_heap->begin;
+ return _Addresses_Subtract( the_heap->end, the_heap->begin );
}
/**@}*/
diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl
index 6f7d272c96..f722620421 100644
--- a/cpukit/score/inline/rtems/score/object.inl
+++ b/cpukit/score/inline/rtems/score/object.inl
@@ -107,7 +107,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(
*
* @return This method returns the class portion of the specified object ID.
*/
-RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
+RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(
Objects_Id id
)
{
diff --git a/cpukit/score/inline/rtems/score/priority.inl b/cpukit/score/inline/rtems/score/priority.inl
index b752a4fc4e..0c94046acb 100644
--- a/cpukit/score/inline/rtems/score/priority.inl
+++ b/cpukit/score/inline/rtems/score/priority.inl
@@ -93,7 +93,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Priority_Mask (
uint32_t bit_number
)
{
- return (0x8000 >> bit_number);
+ return (0x8000u >> bit_number);
}
diff --git a/cpukit/score/inline/rtems/score/tod.inl b/cpukit/score/inline/rtems/score/tod.inl
index c7e0130859..67a37862e9 100644
--- a/cpukit/score/inline/rtems/score/tod.inl
+++ b/cpukit/score/inline/rtems/score/tod.inl
@@ -58,15 +58,19 @@ RTEMS_INLINE_ROUTINE void _TOD_Get_timeval(
struct timeval *time
)
{
- ISR_Level level;
+ ISR_Level level;
struct timespec now;
+ suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
+ useconds = (suseconds_t)now.tv_nsec;
+ useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
+
time->tv_sec = now.tv_sec;
- time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
+ time->tv_usec = useconds;
}
/**@}*/