diff options
author | dim <dim@FreeBSD.org> | 2012-11-05 19:00:25 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-11-05 19:00:25 +0000 |
commit | 04703cf7a9873a9b98bdf81ca1dfb5ad6c8ef4f4 (patch) | |
tree | c476c183f57f6e51802d74200cf6470750608399 /sys/contrib/ngatm | |
parent | 9413d826123906120b1317ad76bcc03cada2f98a (diff) | |
download | FreeBSD-src-04703cf7a9873a9b98bdf81ca1dfb5ad6c8ef4f4.zip FreeBSD-src-04703cf7a9873a9b98bdf81ca1dfb5ad6c8ef4f4.tar.gz |
In sys/contrib/ngatm/netnatm/msg/uni_ie.c, fix a few warnings from newer
versions of clang 3.2, about comparing enum uni_cause values against
integer constants which fall outside the enum range. No functional
change.
MFC after: 3 days
Diffstat (limited to 'sys/contrib/ngatm')
-rw-r--r-- | sys/contrib/ngatm/netnatm/msg/uni_ie.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/contrib/ngatm/netnatm/msg/uni_ie.c b/sys/contrib/ngatm/netnatm/msg/uni_ie.c index eed6458..e4b8310 100644 --- a/sys/contrib/ngatm/netnatm/msg/uni_ie.c +++ b/sys/contrib/ngatm/netnatm/msg/uni_ie.c @@ -869,7 +869,7 @@ UNI_DECLARE_CAUSE_VALUES enum uni_diag uni_diag(enum uni_cause cause, enum uni_coding code) { - if (cause >= 128) + if ((int)cause >= 128) return (UNI_DIAG_NONE); if (code == UNI_CODING_NET) @@ -925,9 +925,9 @@ print_cause(struct unicx *cx, struct uni_ie_cause *ie, if (uni_print_iehdr("cause", &ie->h, cx)) return; - if (ie->cause < 128 && tab1[ie->cause].str) + if ((int)ie->cause < 128 && tab1[ie->cause].str) strcpy(buf, tab1[ie->cause].str); - else if (ie->cause < 128 && tab2 != NULL && tab2[ie->cause].str != NULL) + else if ((int)ie->cause < 128 && tab2 != NULL && tab2[ie->cause].str != NULL) strcpy(buf, tab2[ie->cause].str); else { sprintf(buf, "UNKNOWN-%u", ie->cause); @@ -1059,7 +1059,7 @@ check_cause(struct uni_ie_cause *ie, struct unicx *cx, const struct causetab *ptr; - if (ie->cause >= 128) + if ((int)ie->cause >= 128) return (-1); switch (ie->loc) { |