Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements for recent EPICS base versions and to fix compiler warnings #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@
TOP = ../..
include $(TOP)/configure/CONFIG

ifdef WIN32
# Use the following line if building ezca to be called from
# Visual Basic or other languages
#SHARED_LIBRARIES=YES
# Use the following line to build EzcaScan and ezcaIDL as
# standlone DLLs, i.e. without the need for ezca.dll in the path.
SHARED_LIBRARIES=NO
else
SHARED_LIBRARIES=YES
endif

INC += ezca.h
LIBRARY_HOST = ezca
ezca_SRCS = ezca.c
Expand Down
22 changes: 11 additions & 11 deletions ezca.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ static epicsEventId ezcaDone = 0;
#define EZCA_LOCK() \
do { \
if (DEBUG_LOCK) \
printf("Thread %s (0x%lx) tries to lock\n", \
printf("Thread %s (0x%p) tries to lock\n", \
epicsThreadGetNameSelf(), \
(unsigned long)epicsThreadGetIdSelf()); \
epicsThreadGetIdSelf()); \
epicsMutexLock(ezcaMutex); \
} while (0)
#define EZCA_UNLOCK() \
do { \
if (DEBUG_LOCK) \
printf("Thread %s (0x%lx) unlocks\n", \
printf("Thread %s (0x%p) unlocks\n", \
epicsThreadGetNameSelf(), \
(unsigned long)epicsThreadGetIdSelf()); \
epicsThreadGetIdSelf()); \
epicsMutexUnlock(ezcaMutex); \
} while (0)
#define DO_INIT_ONCE() \
Expand Down Expand Up @@ -1130,7 +1130,7 @@ int epicsShareAPI ezcaGetErrorString(char *prefix, char **buff)
struct work *wp;
char *wtm;
char *cp;
unsigned nbytes;
size_t nbytes;
int rc;

prologue();
Expand Down Expand Up @@ -1277,7 +1277,7 @@ int rc;
if ((*buff = ezcacalloc(nbytes, 1)))
{
if (Debug)
printf("ezcaGetErrorString() just allocated %d bytes\n",
printf("ezcaGetErrorString() just allocated %zu bytes\n",
nbytes);

/* filling the buffer */
Expand Down Expand Up @@ -2080,7 +2080,7 @@ int epicsShareAPI ezcaDelay(float sec)
struct work *wp;
int status;
int rc;
int attempt;
unsigned int attempt;

prologue();

Expand All @@ -2093,7 +2093,7 @@ int attempt;

if (sec > 0)
{
RetryCount = sec/TimeoutSeconds;
RetryCount = (unsigned int)(sec/TimeoutSeconds);
if ( RetryCount * TimeoutSeconds < sec )
RetryCount++;
for ( attempt=0, status = ECA_TIMEOUT;
Expand Down Expand Up @@ -7726,7 +7726,7 @@ int i;
ezcamalloc((unsigned) (sizeof(struct channel)*NODESPERMAL))) != NULL)
{
if (Debug)
printf("pop_channel() allocated sizeof(struct channel) %d * NODESPERMAL %d bytes = %d bytes %p\n",
printf("pop_channel() allocated sizeof(struct channel) %zu * NODESPERMAL %d bytes = %zu bytes %p\n",
sizeof(struct channel), NODESPERMAL,
sizeof(struct channel)*NODESPERMAL, Channel_avail_hdr);

Expand Down Expand Up @@ -7807,7 +7807,7 @@ int i;
ezcamalloc((unsigned) (sizeof(struct monitor)*NODESPERMAL))) != NULL)
{
if (Debug)
printf("pop_monitor() allocated sizeof(struct monitor) %d * NODESPERMAL %d bytes = %d bytes %p\n",
printf("pop_monitor() allocated sizeof(struct monitor) %zu * NODESPERMAL %d bytes = %zu bytes %p\n",
sizeof(struct monitor), NODESPERMAL,
sizeof(struct monitor)*NODESPERMAL, Monitor_avail_hdr);

Expand Down Expand Up @@ -7888,7 +7888,7 @@ int i;
{

if (Debug)
printf("pop_work() allocated sizeof(struct work) %d * NODESPERMAL %d bytes = %d bytes %p\n",
printf("pop_work() allocated sizeof(struct work) %zu * NODESPERMAL %d bytes = %zu bytes %p\n",
sizeof(struct work), NODESPERMAL,
sizeof(struct work)*NODESPERMAL, Work_avail_hdr);

Expand Down
39 changes: 0 additions & 39 deletions ezca.def

This file was deleted.