[sr-dev] git:master: db_text: fix clang compiler warning

Ovidiu Sas osas at voipembedded.com
Wed Sep 3 19:26:45 CEST 2014


Module: sip-router
Branch: master
Commit: f4cfbe9a7ca5fbf1cb44c544abcc27aa65198ae1
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f4cfbe9a7ca5fbf1cb44c544abcc27aa65198ae1

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Wed Sep  3 13:26:14 2014 -0400

db_text: fix clang compiler warning

---

 modules/db_text/dbt_lib.c |    3 +++
 modules/db_text/dbt_res.c |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/db_text/dbt_lib.c b/modules/db_text/dbt_lib.c
index 4626f81..c4aee80 100644
--- a/modules/db_text/dbt_lib.c
+++ b/modules/db_text/dbt_lib.c
@@ -460,6 +460,9 @@ int dbt_is_neq_type(db_type_t _t0, db_type_t _t1)
 		case DB1_BITMAP:
 			if (_t0==DB1_INT)
 				return 0;
+		default:
+			LM_ERR("invalid datatype %d\n", _t1);
+			return 1;
 	}
 	return 1;
 }
diff --git a/modules/db_text/dbt_res.c b/modules/db_text/dbt_res.c
index da0f249..428a86b 100644
--- a/modules/db_text/dbt_res.c
+++ b/modules/db_text/dbt_res.c
@@ -499,8 +499,10 @@ int dbt_cmp_val(dbt_val_p _vp, db_val_t* _v)
 		case DB1_BITMAP:
 			return (_vp->val.int_val<_v->val.bitmap_val)?-1:
 				(_vp->val.int_val>_v->val.bitmap_val)?1:0;
+		default:
+			LM_ERR("invalid datatype %d\n", VAL_TYPE(_v));
+			return -2;
 	}
-	LM_ERR("invalid datatype %d\n", VAL_TYPE(_v));
 	return -2;
 }
 




More information about the sr-dev mailing list