From 58be7e6b131c3d8423a8050a56572dfe21b171ad Mon Sep 17 00:00:00 2001 From: "W. Eric Norum" Date: Mon, 8 Sep 2008 21:33:19 +0000 Subject: [PATCH] Clean up some warnings. --- src/libCom/osi/devLib.c | 14 +++++++------- src/libCom/osi/os/RTEMS/devLibOSD.c | 1 + src/libCom/osi/os/RTEMS/osdEvent.c | 8 ++++---- src/libCom/osi/os/RTEMS/osdThread.c | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/libCom/osi/devLib.c b/src/libCom/osi/devLib.c index 27810740f..d88380b67 100644 --- a/src/libCom/osi/devLib.c +++ b/src/libCom/osi/devLib.c @@ -428,8 +428,8 @@ LOCAL void report_conflict ( __LINE__, "%10s 0X%08X - OX%08X Requested by %s", epicsAddressTypeName[addrType], - base, - base+size-1, + (unsigned int)base, + (unsigned int)(base+size-1), pOwnerName); pRange = (rangeItem *) ellFirst(&addrAlloc[addrType]); @@ -454,8 +454,8 @@ LOCAL void report_conflict_device(epicsAddressType addrType, const rangeItem *pR __LINE__, "%10s 0X%08X - 0X%08X Owned by %s", epicsAddressTypeName[addrType], - pRange->begin, - pRange->end, + (unsigned int)pRange->begin, + (unsigned int)pRange->end, pRange->pOwnerName); } @@ -508,7 +508,7 @@ long devUnregisterAddress( __LINE__, "unregister address for %s at 0X%X failed because %s owns it", pOwnerName, - baseAddress, + (unsigned int)baseAddress, pRange->pOwnerName); return s; } @@ -608,7 +608,7 @@ long devAllocAddress( { int s; rangeItem *pRange; - size_t base; + size_t base = 0; if (!devLibInitFlag) { s = devLibInit(); @@ -1062,7 +1062,7 @@ void *devLibA24Malloc(size_t size) void *ret; if (devLibA24Debug) - epicsPrintf ("devLibA24Malloc(%d) entered\n", size); + epicsPrintf ("devLibA24Malloc(%u) entered\n", (unsigned int)size); ret = pdevLibVirtualOS->pDevA24Malloc(size); return(ret); diff --git a/src/libCom/osi/os/RTEMS/devLibOSD.c b/src/libCom/osi/os/RTEMS/devLibOSD.c index 524fc090f..b1e8fadf4 100644 --- a/src/libCom/osi/os/RTEMS/devLibOSD.c +++ b/src/libCom/osi/os/RTEMS/devLibOSD.c @@ -233,6 +233,7 @@ LOCAL long rtmsDevMapAddr (epicsAddressType addrType, unsigned options, * a bus error safe "wordSize" read at the specified address which returns * unsuccessful status if the device isnt present */ +rtems_status_code bspExtMemProbe(void *addr, int write, int size, void *pval); long rtmsDevReadProbe (unsigned wordSize, volatile const void *ptr, void *pValue) { long status; diff --git a/src/libCom/osi/os/RTEMS/osdEvent.c b/src/libCom/osi/os/RTEMS/osdEvent.c index 9ac7b3ab9..032f1d402 100644 --- a/src/libCom/osi/os/RTEMS/osdEvent.c +++ b/src/libCom/osi/os/RTEMS/osdEvent.c @@ -190,18 +190,18 @@ epicsEventShow(epicsEventId id, unsigned int level) */ semaphore = *the_semaphore; _Thread_Enable_dispatch(); - printf (" %8.8x ", sid); + printf (" %8.8x ", (int)sid); if (_Attributes_Is_counting_semaphore (semaphore.attribute_set)) { - printf ("Count: %d", semaphore.Core_control.semaphore.count); + printf ("Count: %d", (int)semaphore.Core_control.semaphore.count); } else { if (_CORE_mutex_Is_locked(&semaphore.Core_control.mutex)) { char name[30]; epicsThreadGetName ((epicsThreadId)semaphore.Core_control.mutex.holder_id, name, sizeof name); printf ("Held by:%8.8x (%s) Nest count:%d", - semaphore.Core_control.mutex.holder_id, + (unsigned int)semaphore.Core_control.mutex.holder_id, name, - semaphore.Core_control.mutex.nest_count); + (int)semaphore.Core_control.mutex.nest_count); } else { printf ("Not Held"); diff --git a/src/libCom/osi/os/RTEMS/osdThread.c b/src/libCom/osi/os/RTEMS/osdThread.c index 59d99470b..142163c16 100644 --- a/src/libCom/osi/os/RTEMS/osdThread.c +++ b/src/libCom/osi/os/RTEMS/osdThread.c @@ -418,7 +418,7 @@ void epicsThreadGetName (epicsThreadId id, char *name, size_t size) taskVarUnlock (); if (!haveName) { #if (__RTEMS_MAJOR__>4 || (__RTEMS_MAJOR__==4 && __RTEMS_MINOR__>8) || (__RTEMS_MAJOR__==4 && __RTEMS_MINOR__==8 && __RTEMS_REVISION__>=99)) - if (_Objects_Get_name_as_string(id, size, name) != NULL) + if (_Objects_Get_name_as_string((rtems_id)id, size, name) != NULL) haveName = 1; #else /*