summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYatianXU <yatian.xu@nokia-sbell.com>2019-09-07 04:33:35 -0400
committerYatian XU <yatian.xu@nokia-sbell.com>2019-09-07 11:03:12 +0000
commitd0d0c2fb41c2e61b69b5dc9e38f3e60843f4388d (patch)
tree2e08fe87af01e2d4fba0ae1c0af4873f7beac7ad
parent998c19266ef5f74fffd79e9c0c0a65f77ff19a43 (diff)
Change the for loop initial declarations to avoid adding -std=c99 in CFLAGS.
As strdup() provided by POSIX returns "address out of bould" in C99 mode, which may cause program crash. Issue-ID: VNFSDK-465 Signed-off-by: YatianXU <yatian.xu@nokia-sbell.com> Change-Id: I57f55edd939d64c2e201a345fe83659048308d50
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_fault.c4
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_heartbeat_fields.c4
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_mobile_flow.c28
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_notification.c8
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_other.c7
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_pnf_registration.c4
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_scaling_measurement.c11
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_sipsignaling.c4
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_state_change.c4
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_syslog.c4
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_threshold_cross.c7
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c4
12 files changed, 46 insertions, 43 deletions
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_fault.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_fault.c
index 3029cf1..f904aeb 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_fault.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_fault.c
@@ -311,8 +311,8 @@ void evel_json_encode_fault(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "alarmAdditionalInformation"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_heartbeat_fields.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_heartbeat_fields.c
index 5b97906..220d088 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_heartbeat_fields.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_heartbeat_fields.c
@@ -207,8 +207,8 @@ void evel_json_encode_hrtbt_field(EVEL_JSON_BUFFER * const jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_mobile_flow.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_mobile_flow.c
index 53fbce3..d8df0ab 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_mobile_flow.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_mobile_flow.c
@@ -961,8 +961,8 @@ void evel_json_encode_mobile_flow(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -2240,8 +2240,8 @@ void evel_json_encode_mobile_flow_gtp_flow_metrics(
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "ipTosCountList"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -2287,8 +2287,8 @@ void evel_json_encode_mobile_flow_gtp_flow_metrics(
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_list(jbuf, "ipTosList"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -2331,8 +2331,8 @@ void evel_json_encode_mobile_flow_gtp_flow_metrics(
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "mobileQciCosCountList"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -2378,8 +2378,8 @@ void evel_json_encode_mobile_flow_gtp_flow_metrics(
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_list(jbuf, "mobileQciCosList"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -2422,8 +2422,8 @@ void evel_json_encode_mobile_flow_gtp_flow_metrics(
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "tcpFlagCountList"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -2469,8 +2469,8 @@ void evel_json_encode_mobile_flow_gtp_flow_metrics(
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_list(jbuf, "tcpFlagList"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_notification.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_notification.c
index 6307dd1..324df28 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_notification.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_notification.c
@@ -405,8 +405,8 @@ void evel_json_encode_notification(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -463,8 +463,8 @@ void evel_json_encode_notification(EVEL_JSON_BUFFER * jbuf,
evel_enc_kv_string(jbuf, "name", ht->hmName);
if (evel_json_open_opt_named_object(jbuf, "hashMap"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_other.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_other.c
index 61809f0..4dd635e 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_other.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_other.c
@@ -282,8 +282,8 @@ void evel_json_encode_other(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "hashMap"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -426,7 +426,8 @@ void evel_json_encode_other(EVEL_JSON_BUFFER * jbuf,
evel_enc_kv_string(jbuf, "name", ht->hmName);
if (evel_json_open_opt_named_object(jbuf, "hashMap"))
{
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_pnf_registration.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_pnf_registration.c
index 9de25e5..f06e47b 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_pnf_registration.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_pnf_registration.c
@@ -226,8 +226,8 @@ void evel_json_encode_pnf_registration(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_scaling_measurement.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_scaling_measurement.c
index d0d31dd..abda05e 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_scaling_measurement.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_scaling_measurement.c
@@ -5107,8 +5107,8 @@ void evel_json_encode_measurement(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -5656,7 +5656,8 @@ void evel_json_encode_measurement(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "featureUsageArray"))
{
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -5755,8 +5756,8 @@ void evel_json_encode_measurement(EVEL_JSON_BUFFER * jbuf,
if (evel_json_open_opt_named_object(jbuf, "hashMap"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_sipsignaling.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_sipsignaling.c
index 6046bda..ee96f5d 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_sipsignaling.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_sipsignaling.c
@@ -498,8 +498,8 @@ void evel_json_encode_signaling(EVEL_JSON_BUFFER * const jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalInformation"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_state_change.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_state_change.c
index 906b299..7d7c145 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_state_change.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_state_change.c
@@ -247,8 +247,8 @@ void evel_json_encode_state_change(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_syslog.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_syslog.c
index b97be7c..b90c20f 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_syslog.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_syslog.c
@@ -525,8 +525,8 @@ void evel_json_encode_syslog(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_threshold_cross.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_threshold_cross.c
index c308bc6..0c22a0d 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_threshold_cross.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_threshold_cross.c
@@ -495,7 +495,8 @@ void evel_json_encode_perf_counter( EVEL_JSON_BUFFER * jbuf, PERF_COUNTER *pcoun
{
if (evel_json_open_opt_named_object(jbuf, "hashMap"))
{
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
@@ -622,8 +623,8 @@ void evel_json_encode_threshold_cross(EVEL_JSON_BUFFER * const jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalFields"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c
index 1a77e76..4f454fb 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c
@@ -536,8 +536,8 @@ void evel_json_encode_voice_quality(EVEL_JSON_BUFFER * jbuf,
evel_json_checkpoint(jbuf);
if (evel_json_open_opt_named_object(jbuf, "additionalInformation"))
{
-
- for(unsigned int idx = 0; idx < ht->size; idx++ )
+ unsigned int idx = 0;
+ for(; idx < ht->size; idx++ )
{
/*****************************************************************/
/* Get the first entry of a particular Key and loop through the */