Skip to content

Commit b8f1d5e

Browse files
committed
Move SR_STATUS_STR to avoid unused variable warning
1 parent d690ad7 commit b8f1d5e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

asApp/src/dbrestore.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ int restoreFileListsInitialized = 0;
106106
ELLLIST pass0List;
107107
ELLLIST pass1List;
108108

109+
extern char SR_STATUS_STR[5][10];
110+
109111
void myPrintErrno(char *s, char *file, int line)
110112
{
111113
errlogPrintf("%s(%d): [0x%x]=%s:%s\n", file, line, errno, s, strerror(errno));

asApp/src/save_restore.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,9 @@ STATIC epicsThreadId taskID = 0; /* save_restore task ID */
343343
/*** stuff for reporting status to EPICS client ***/
344344
STATIC char status_prefix[30] = "";
345345

346+
/* Make sure to leave room for trailing null */
347+
char SR_STATUS_STR[5][10] = {"No Status", " Failure ", " Warning ", " Warning ", " Ok "};
348+
346349
STATIC long SR_status = SR_STATUS_INIT;
347350
STATIC unsigned short SR_heartbeat = 0;
348351
STATIC char SR_statusStr[STATUS_STR_LEN] = "", SR_recentlyStr[STATUS_STR_LEN] = "";

asApp/src/save_restore.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
#define MAX(a, b) ((a) > (b) ? (a) : (b))
3030
#define MIN(a, b) ((a) < (b) ? (a) : (b))
3131

32-
/* Make sure to leave room for trailing null */
33-
static char SR_STATUS_STR[5][10] = {"No Status", " Failure ", " Warning ", " Warning ", " Ok "};
34-
3532
#define SR_STATUS_OK 4
3633
#define SR_STATUS_SEQ_WARN 3
3734
#define SR_STATUS_WARN 2

0 commit comments

Comments
 (0)