Patch from Russell Bryant to fix up gcc 4 warnings

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@793 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Steven Dake 2005-08-12 22:29:35 +00:00
parent 00c5457af7
commit 4ff4c440ca
16 changed files with 133 additions and 124 deletions

View File

@ -2659,8 +2659,7 @@ static int message_handler_req_amf_stoppingcomplete (struct conn_info *conn_info
void *message)
{
struct req_amf_stoppingcomplete *req_amf_stoppingcomplete = (struct req_amf_stoppingcomplete *)message;
struct conn_info *inv_conn_info;
struct conn_info *inv_conn_info = NULL;
int interface;
log_printf (LOG_LEVEL_FROM_LIB, "Handle : message_handler_req_amf_stoppingcomplete()\n");
@ -2690,8 +2689,8 @@ static int message_handler_req_amf_response (struct conn_info *conn_info_nouse,
{
struct req_amf_response *req_amf_response = (struct req_amf_response *)message;
struct res_lib_amf_response res_lib_amf_response;
struct conn_info *conn_info;
int interface;
struct conn_info *conn_info = NULL;
int interface = 0;
int res;
log_printf (LOG_LEVEL_DEBUG, "Handle : message_handler_req_amf_response()\n");

View File

@ -1742,7 +1742,7 @@ void timer_function_section_expire (void *data)
}
ckptCheckpointSection = ckpt_checkpoint_find_globalSection (ckptCheckpoint,
ckpt_id->ckpt_section_id.id,
(char *)ckpt_id->ckpt_section_id.id,
(int)ckpt_id->ckpt_section_id.idLen);
if (ckptCheckpointSection == 0) {
log_printf (LOG_LEVEL_ERROR, "CKPT: timer_function_section_expire could not find section %s in ckpt %s\n",

View File

@ -202,8 +202,8 @@ static int clm_exec_init_fn (struct openais_config *openais_config)
memcpy (&thisClusterNode.nodeAddress.value, &this_ip->sin_addr,
sizeof (struct in_addr));
thisClusterNode.nodeAddress.length = sizeof (struct in_addr);
strcpy (thisClusterNode.nodeName.value, (char *)inet_ntoa (this_ip->sin_addr));
thisClusterNode.nodeName.length = strlen (thisClusterNode.nodeName.value);
strcpy ((char *)thisClusterNode.nodeName.value, (char *)inet_ntoa (this_ip->sin_addr));
thisClusterNode.nodeName.length = strlen ((char *)thisClusterNode.nodeName.value);
thisClusterNode.member = 1;
{
struct sysinfo s_info;
@ -388,8 +388,8 @@ static int clm_confchg_fn (
memcpy (&thisClusterNode.nodeAddress.value, &this_ip->sin_addr,
sizeof (struct in_addr));
thisClusterNode.nodeAddress.length = sizeof (struct in_addr);
strcpy (thisClusterNode.nodeName.value, (char *)inet_ntoa (this_ip->sin_addr));
thisClusterNode.nodeName.length = strlen (thisClusterNode.nodeName.value);
strcpy ((char *)thisClusterNode.nodeName.value, (char *)inet_ntoa (this_ip->sin_addr));
thisClusterNode.nodeName.length = strlen ((char *)thisClusterNode.nodeName.value);
return (0);
}

View File

@ -401,7 +401,7 @@ static struct evt_pattern dropped_pattern = {
.pat = {
sizeof(lost_evt),
sizeof(lost_evt),
&dropped_pattern.str[0]},
(SaUint8T *) &dropped_pattern.str[0]},
.str = {SA_EVT_LOST_EVENT}
};
@ -1533,7 +1533,7 @@ filter_match(SaEvtEventPatternT *ep, SaEvtEventFilterT *ef)
if (ef->filter.patternSize > ep->patternSize) {
break;
}
if (strncmp(ef->filter.pattern, ep->pattern,
if (strncmp((char *)ef->filter.pattern, (char *)ep->pattern,
ef->filter.patternSize) == 0) {
ret = SA_AIS_OK;
}
@ -1542,8 +1542,8 @@ filter_match(SaEvtEventPatternT *ep, SaEvtEventFilterT *ef)
if (ef->filter.patternSize > ep->patternSize) {
break;
}
if (strncmp(ef->filter.pattern,
&ep->pattern[ep->patternSize - ef->filter.patternSize],
if (strncmp((char *)ef->filter.pattern,
(char *)&ep->pattern[ep->patternSize - ef->filter.patternSize],
ef->filter.patternSize) == 0) {
ret = SA_AIS_OK;
}
@ -1553,7 +1553,7 @@ filter_match(SaEvtEventPatternT *ep, SaEvtEventFilterT *ef)
if (ef->filter.patternSize != ep->patternSize) {
break;
}
if (strncmp(ef->filter.pattern, ep->pattern,
if (strncmp((char *)ef->filter.pattern, (char *)ep->pattern,
ef->filter.patternSize) == 0) {
ret = SA_AIS_OK;
}

View File

@ -275,7 +275,7 @@ struct sort_queue_item {
};
struct orf_token_mcast_thread_state {
char iobuf[9000];
unsigned char iobuf[9000];
prng_state prng_state;
};
@ -1890,19 +1890,19 @@ printf ("copying %d\n", i);
static void encrypt_and_sign_worker (
struct totemsrp_instance *instance,
char *buf,
unsigned char *buf,
int *buf_len,
struct iovec *iovec,
int iov_len,
prng_state *prng_state_in)
{
int i;
char *addr;
char keys[48];
unsigned char *addr;
unsigned char keys[48];
struct security_header *header;
char *hmac_key = &keys[32];
char *cipher_key = &keys[16];
char *initial_vector = &keys[0];
unsigned char *hmac_key = &keys[32];
unsigned char *cipher_key = &keys[16];
unsigned char *initial_vector = &keys[0];
unsigned long len;
int outlen = 0;
hmac_state hmac_state;
@ -1989,13 +1989,13 @@ static void encrypt_and_sign (
char *addr = instance->iov_encrypted.iov_base +
sizeof (struct security_header);
int i;
char keys[48];
unsigned char keys[48];
struct security_header *header = instance->iov_encrypted.iov_base;
prng_state keygen_prng_state;
prng_state stream_prng_state;
char *hmac_key = &keys[32];
char *cipher_key = &keys[16];
char *initial_vector = &keys[0];
unsigned char *hmac_key = &keys[32];
unsigned char *cipher_key = &keys[16];
unsigned char *initial_vector = &keys[0];
unsigned long len;
instance->iov_encrypted.iov_len = 0;
@ -2092,14 +2092,14 @@ static int authenticate_and_decrypt (
struct totemsrp_instance *instance,
struct iovec *iov)
{
char keys[48];
unsigned char keys[48];
struct security_header *header = iov[0].iov_base;
prng_state keygen_prng_state;
prng_state stream_prng_state;
char *hmac_key = &keys[32];
char *cipher_key = &keys[16];
char *initial_vector = &keys[0];
char digest_comparison[HMAC_HASH_SIZE];
unsigned char *hmac_key = &keys[32];
unsigned char *cipher_key = &keys[16];
unsigned char *initial_vector = &keys[0];
unsigned char digest_comparison[HMAC_HASH_SIZE];
unsigned long len;
int res = 0;
@ -3748,7 +3748,7 @@ static int message_handler_orf_token (
char token_storage[1500];
char token_convert[1500];
struct orf_token *token;
int prio = UINT_MAX;
unsigned int prio = UINT_MAX;
struct pollfd ufd;
int nfds;
struct orf_token *token_ref = (struct orf_token *)iovec->iov_base;
@ -3762,19 +3762,19 @@ static int message_handler_orf_token (
struct timeval tv_current;
struct timeval tv_diff;
gettimeofday (&tv_current, NULL);
timersub (&tv_current, &tv_old, &tv_diff);
memcpy (&tv_old, &tv_current, sizeof (struct timeval));
gettimeofday (&tv_current, NULL);
timersub (&tv_current, &tv_old, &tv_diff);
memcpy (&tv_old, &tv_current, sizeof (struct timeval));
if ((((float)tv_diff.tv_usec) / 100.0) > 5.0) {
printf ("OTHERS %0.4f ms\n", ((float)tv_diff.tv_usec) / 100.0);
}
if ((((float)tv_diff.tv_usec) / 100.0) > 5.0) {
printf ("OTHERS %0.4f ms\n", ((float)tv_diff.tv_usec) / 100.0);
}
#endif
#ifdef RANDOM_DROP
if (random () % 100 < 10) {
return (0);
}
if (random () % 100 < 10) {
return (0);
}
#endif
/*

View File

@ -68,8 +68,8 @@ typedef SaInt64T SaTimeT;
#define SA_MAX_NAME_LENGTH 256
typedef struct {
SaUint16T length;
unsigned char value[SA_MAX_NAME_LENGTH];
SaUint16T length;
SaUint8T value[SA_MAX_NAME_LENGTH];
} SaNameT;
typedef struct {

View File

@ -140,7 +140,7 @@ static struct saVersionDatabase ckptVersionDatabase = {
struct iteratorSectionIdListEntry {
struct list_head list;
char data[0];
unsigned char data[0];
};

View File

@ -83,12 +83,12 @@ SaCkptCheckpointCreationAttributesT checkpointCreationAttributes = {
SaCkptSectionIdT sectionId1 = {
14,
"section ID #1"
(SaUint8T *) "section ID #1"
};
SaCkptSectionIdT sectionId2 = {
14,
"section ID #2"
(SaUint8T *) "section ID #2"
};
SaCkptSectionCreationAttributesT sectionCreationAttributes1 = {
&sectionId1,
@ -108,7 +108,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
readBuffer1,
sizeof (readBuffer1),
@ -118,7 +118,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #2"
(SaUint8T *) "section ID #2"
},
readBuffer2,
sizeof (readBuffer2),
@ -135,7 +135,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
data, /*"written data #1, this should extend past end of old section data", */
DATASIZE, /*sizeof ("data #1, this should extend past end of old section data") + 1, */
@ -146,7 +146,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #2"
(SaUint8T *) "section ID #2"
},
data, /*"written data #2, this should extend past end of old section data" */
DATASIZE, /*sizeof ("written data #2, this should extend past end of old section data") + 1, */

View File

@ -76,12 +76,12 @@ SaCkptCheckpointCreationAttributesT checkpointCreationAttributes = {
SaCkptSectionIdT sectionId1 = {
14,
"section ID #1"
(SaUint8T *) "section ID #1"
};
SaCkptSectionIdT sectionId2 = {
14,
"section ID #2"
(SaUint8T *) "section ID #2"
};
SaCkptSectionCreationAttributesT sectionCreationAttributes1 = {
&sectionId1,
@ -101,7 +101,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
readBuffer1,
sizeof (readBuffer1),
@ -111,7 +111,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #2"
(SaUint8T *) "section ID #2"
},
readBuffer2,
sizeof (readBuffer2),
@ -128,7 +128,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
data, /*"written data #1, this should extend past end of old section data", */
DATASIZE, /*sizeof ("data #1, this should extend past end of old section data") + 1, */
@ -139,7 +139,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #2"
(SaUint8T *) "section ID #2"
},
data, /*"written data #2, this should extend past end of old section data" */
DATASIZE, /*sizeof ("written data #2, this should extend past end of old section data") + 1, */
@ -251,7 +251,7 @@ int main (void) {
* Create CHECPOINT_THREADS checkpoints
*/
for (i = 0; i < CHECKPOINT_THREADS; i++) {
sprintf (checkpointName.value, "checkpoint%d \n", i);
sprintf ((char *)checkpointName.value, "checkpoint%d \n", i);
error = saCkptInitialize (&ckptHandles[i], &callbacks, &version);
assert (error == SA_AIS_OK);

View File

@ -80,12 +80,12 @@ SaCkptCheckpointCreationAttributesT checkpointCreationAttributes = {
SaCkptSectionIdT sectionId1 = {
14,
"section ID #1"
(SaUint8T *) "section ID #1"
};
SaCkptSectionIdT sectionId2 = {
14,
"section ID #2"
(SaUint8T *) "section ID #2"
};
SaCkptSectionCreationAttributesT sectionCreationAttributes1 = {
&sectionId1,
@ -105,7 +105,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
readBuffer1,
sizeof (readBuffer1),
@ -115,7 +115,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #2"
(SaUint8T *) "section ID #2"
},
readBuffer2,
sizeof (readBuffer2),
@ -130,7 +130,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
data, /*"written data #1, this should extend past end of old section data", */
DATASIZE, /*sizeof ("written data #1, this should extend past end of old section data") + 1, */
@ -141,7 +141,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #2"
(SaUint8T *) "section ID #2"
},
data, /*"written data #2, this should extend past end of old section data" */
DATASIZE, /*sizeof ("written data #2, this should extend past end of old section data") + 1, */

View File

@ -33,19 +33,22 @@ unsigned int subscription_id = 0xfedcba98;
unsigned long long ret_time = 0000000000ULL; /* 0 seconds */
char pubname[256] = "Test Pub Name";
#define patt1 "Filter pattern 1"
#define patt1_size sizeof(patt1)
#define patt2 "Filter pattern 2"
#define patt2_size sizeof(patt2)
#define _patt1 "Filter pattern 1"
#define patt1 (SaUint8T *) _patt1
#define patt1_size sizeof(_patt1)
#define patt3 "Filter pattern 3"
#define patt3_size sizeof(patt3)
#define _patt2 "Filter pattern 2"
#define patt2 (SaUint8T *) _patt2
#define patt2_size sizeof(_patt2)
#define patt4 "Filter pattern 4"
#define patt4_size sizeof(patt4)
#define _patt3 "Filter pattern 3"
#define patt3 (SaUint8T *) _patt3
#define patt3_size sizeof(_patt3)
#define _patt4 "Filter pattern 4"
#define patt4 (SaUint8T *) _patt4
#define patt4_size sizeof(_patt4)
SaEvtEventFilterT filters[] = {
{SA_EVT_PREFIX_FILTER, {patt1_size, patt1_size, patt1}},
@ -139,7 +142,7 @@ test_pub()
SA_EVT_CHANNEL_SUBSCRIBER |
#endif
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
@ -182,7 +185,7 @@ test_pub()
goto evt_free;
}
strcpy(test_pub_name.value, pubname);
strcpy((char *)test_pub_name.value, pubname);
test_pub_name.length = strlen(pubname);
test_retention = ret_time;
result = saEvtEventAttributesSet(event_handle,

View File

@ -43,18 +43,21 @@ unsigned int subscription_id = 0xfedcba98;
unsigned long long ret_time = 30000000000ULL; /* 30 seconds */
char pubname[256] = "Test Pub Name";
#define patt1 "Filter pattern 1"
#define patt1_size sizeof(patt1)
#define _patt1 "Filter pattern 1"
#define patt1 (SaUint8T *) _patt1
#define patt1_size sizeof(_patt1)
#define patt2 "Filter pattern 2"
#define patt2_size sizeof(patt2)
#define _patt2 "Filter pattern 2"
#define patt2 (SaUint8T *) _patt2
#define patt2_size sizeof(_patt2)
#define patt3 "Filter pattern 3"
#define patt3_size sizeof(patt3)
#define _patt3 "Filter pattern 3"
#define patt3 (SaUint8T *) _patt3
#define patt3_size sizeof(_patt3)
#define patt4 "Filter pattern 4"
#define patt4_size sizeof(patt4)
#define _patt4 "Filter pattern 4"
#define patt4 (SaUint8T *) _patt4
#define patt4_size sizeof(_patt4)
SaEvtEventFilterT filters[] = {
@ -145,7 +148,7 @@ test_pub()
SA_EVT_CHANNEL_SUBSCRIBER |
#endif
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
@ -194,7 +197,7 @@ test_pub()
return(result);
}
strcpy(test_pub_name.value, pubname);
strcpy((char *)test_pub_name.value, pubname);
test_pub_name.length = strlen(pubname);
test_retention = ret_time;
do {

View File

@ -104,7 +104,7 @@ test_subscription()
SaAisErrorT result;
flags = SA_EVT_CHANNEL_SUBSCRIBER | SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
printf("Test subscription:\n");
@ -290,7 +290,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id,
ais_time_str(publish_time));
if ((evt_pat_get_array.patternsNumber == 0)||
(strcmp(evt_pat_get_array.patterns[0].pattern, SA_EVT_LOST_EVENT) != 0)) {
(strcmp((char *)evt_pat_get_array.patterns[0].pattern, SA_EVT_LOST_EVENT) != 0)) {
dprintf("*** Received SA_EVT_EVENTID_LOST but pattern is wrong: %s\n",
evt_pat_get_array.patterns[0].pattern);
}
@ -424,7 +424,7 @@ int main (int argc, char **argv)
(unsigned int)strtoul(p, NULL, 0);
p = strsep(&optarg, ",");
filters[sub_next].filter.pattern = malloc(strlen(p));
strcpy(filters[sub_next].filter.pattern, p);
strcpy((char *)filters[sub_next].filter.pattern, p);
filters[sub_next].filter.patternSize = strlen(p);
p = strsep(&optarg, ",");
filters[sub_next++].filterType = strtoul(p,0, 0);

View File

@ -75,12 +75,12 @@ SaCkptCheckpointCreationAttributesT checkpointCreationAttributes = {
SaCkptSectionIdT sectionId1 = {
14,
"section ID #1"
(SaUint8T *) "section ID #1"
};
SaCkptSectionIdT sectionId2 = {
14,
"section ID #2"
(SaUint8T *) "section ID #2"
};
SaCkptSectionCreationAttributesT sectionCreationAttributes1 = {
@ -103,7 +103,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
readBuffer1,
sizeof (readBuffer1),
@ -113,7 +113,7 @@ SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
14,
"section ID #2"
(SaUint8T *) "section ID #2"
},
readBuffer2,
sizeof (readBuffer2),
@ -141,7 +141,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #1"
(SaUint8T *) "section ID #1"
},
data1, /*"written data #1, this should extend past end of old section data", */
DATASIZE, /*sizeof ("data #1, this should extend past end of old section data") + 1, */
@ -151,7 +151,7 @@ SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
14,
"section ID #2",
(SaUint8T *) "section ID #2",
},
data2, /*"written data #2, this should extend past end of old section data" */
DATASIZE, /*sizeof ("written data #2, this should extend past end of old section data") + 1, */

View File

@ -158,17 +158,21 @@ void test_initialize (void) {
}
#define patt1 "Filter pattern 1"
#define patt1_size sizeof(patt1)
#define _patt1 "Filter pattern 1"
#define patt1 (SaUint8T *) _patt1
#define patt1_size sizeof(_patt1)
#define patt2 "Filter pattern 2"
#define patt2_size sizeof(patt2)
#define _patt2 "Filter pattern 2"
#define patt2 (SaUint8T *) _patt2
#define patt2_size sizeof(_patt2)
#define patt3 "Filter pattern 3"
#define patt3_size sizeof(patt3)
#define _patt3 "Filter pattern 3"
#define patt3 (SaUint8T *) _patt3
#define patt3_size sizeof(_patt3)
#define patt4 "Filter pattern 4"
#define patt4_size sizeof(patt4)
#define _patt4 "Filter pattern 4"
#define patt4 (SaUint8T *) _patt4
#define patt4_size sizeof(_patt4)
SaEvtEventFilterT filters[] = {
@ -244,7 +248,7 @@ test_channel()
flags = SA_EVT_CHANNEL_PUBLISHER |
SA_EVT_CHANNEL_SUBSCRIBER |
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
/*
* Channel open/close test
@ -905,7 +909,7 @@ test_event()
flags = SA_EVT_CHANNEL_PUBLISHER|SA_EVT_CHANNEL_SUBSCRIBER |
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
printf("Test Event operations:\n");
@ -1435,19 +1439,19 @@ test_multi_channel1()
{
SaEvtEventFilterT filt1[1] = {
{SA_EVT_EXACT_FILTER, {8,8, "ChanPat1"}},
{SA_EVT_EXACT_FILTER, {8,8, (SaUint8T *) "ChanPat1"}},
};
SaEvtEventFilterT filt2[1] = {
{SA_EVT_EXACT_FILTER, {8, 8, "ChanPat2"}},
{SA_EVT_EXACT_FILTER, {8, 8, (SaUint8T *) "ChanPat2"}},
};
SaEvtEventFilterArrayT sub_filt = {
1, NULL
};
SaEvtEventPatternT pat1 = {8, 8, "ChanPat1"};
SaEvtEventPatternT pat2 = {8, 8, "ChanPat2"};
SaEvtEventPatternT pat3 = {8, 8, "ChanPat3"};
SaEvtEventPatternT pat1 = {8, 8, (SaUint8T *) "ChanPat1"};
SaEvtEventPatternT pat2 = {8, 8, (SaUint8T *) "ChanPat2"};
SaEvtEventPatternT pat3 = {8, 8, (SaUint8T *) "ChanPat3"};
SaEvtEventPatternArrayT evt_pat = {
1, 1, NULL
@ -1475,7 +1479,7 @@ test_multi_channel1()
flags = SA_EVT_CHANNEL_PUBLISHER|SA_EVT_CHANNEL_SUBSCRIBER |
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
printf("Test multiple operations:\n");
@ -1779,14 +1783,14 @@ test_multi_channel2()
{
SaEvtEventFilterT filt1[1] = {
{SA_EVT_EXACT_FILTER, {8, 8, "ChanPat1"}},
{SA_EVT_EXACT_FILTER, {8, 8, (SaUint8T *) "ChanPat1"}},
};
SaEvtEventFilterArrayT sub_filt = {
1, NULL
};
SaEvtEventPatternT pat1 = {8, 8, "ChanPat1"};
SaEvtEventPatternT pat1 = {8, 8, (SaUint8T *) "ChanPat1"};
SaEvtEventPatternArrayT evt_pat = {
1, 1, NULL
@ -1815,7 +1819,7 @@ test_multi_channel2()
flags = SA_EVT_CHANNEL_PUBLISHER|SA_EVT_CHANNEL_SUBSCRIBER |
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
/*
@ -2079,15 +2083,15 @@ test_multi_channel3()
{
SaEvtEventFilterT filt1[1] = {
{SA_EVT_PREFIX_FILTER, {7, 7, "ChanPat"}},
{SA_EVT_PREFIX_FILTER, {7, 7, (SaUint8T *) "ChanPat"}},
};
SaEvtEventFilterArrayT sub_filt = {
1, NULL
};
SaEvtEventPatternT pat1 = {8, 8, "ChanPat1"};
SaEvtEventPatternT pat2 = {8, 8, "ChanPat2"};
SaEvtEventPatternT pat1 = {8, 8, (SaUint8T *) "ChanPat1"};
SaEvtEventPatternT pat2 = {8, 8, (SaUint8T *) "ChanPat2"};
SaEvtEventPatternArrayT evt_pat = {
1, 1, NULL
@ -2118,11 +2122,11 @@ test_multi_channel3()
flags = SA_EVT_CHANNEL_PUBLISHER|SA_EVT_CHANNEL_SUBSCRIBER |
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
channel_name.length = strlen(channel_name.value);
strcpy(channel_name1.value, channel);
strcat(channel_name1.value, "_1");
channel_name1.length = strlen(channel_name1.value);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen((char *)channel_name.value);
strcpy((char *)channel_name1.value, channel);
strcat((char *)channel_name1.value, "_1");
channel_name1.length = strlen((char *)channel_name1.value);
/*
@ -2412,7 +2416,7 @@ test_retention()
flags = SA_EVT_CHANNEL_PUBLISHER |
SA_EVT_CHANNEL_SUBSCRIBER |
SA_EVT_CHANNEL_CREATE;
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
printf("Test Event retention:\n");
@ -2869,7 +2873,7 @@ test_unlink_channel()
*/
printf(" 1 Channel unlink:\n");
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
do {
result = saEvtChannelUnlink(handle, &channel_name);
@ -2880,7 +2884,7 @@ test_unlink_channel()
goto unlink_exit;
}
strcpy(channel_name.value, unlink_channel);
strcpy((char *)channel_name.value, unlink_channel);
channel_name.length = strlen(unlink_channel);
do {
result = saEvtChannelUnlink(handle, &channel_name);

View File

@ -48,7 +48,7 @@ do_unlink()
return(result);
}
strcpy(channel_name.value, channel);
strcpy((char *)channel_name.value, channel);
channel_name.length = strlen(channel);
do {
result = saEvtChannelUnlink(handle, &channel_name);