summaryrefslogtreecommitdiff
path: root/cord
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2015-09-19 01:26:36 +0300
committerIvan Maidanski <ivmai@mail.ru>2015-09-19 01:26:36 +0300
commit623679f5b3360a6fafc4fed45ccbc873eaa64e9e (patch)
tree9332a75545685a7307cf68303fc9b4ad0db2034e /cord
parent96991c8e1663bbae2455bb368ab9538b5e4d29b4 (diff)
downloadbdwgc-623679f5b3360a6fafc4fed45ccbc873eaa64e9e.tar.gz
Fix 'value truncated' compiler warning in CORD_cat (MS VC)
* cord/cordbscs.c (CORD_cat_char_star, CORD_cat): Cast "lenx" to unsigned char (to workaround false compiler warning about value truncation).
Diffstat (limited to 'cord')
-rw-r--r--cord/cordbscs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cord/cordbscs.c b/cord/cordbscs.c
index 56536726..e8246d2f 100644
--- a/cord/cordbscs.c
+++ b/cord/cordbscs.c
@@ -221,7 +221,8 @@ CORD CORD_cat_char_star(CORD x, const char * y, size_t leny)
if (result == 0) OUT_OF_MEMORY;
result->header = CONCAT_HDR;
result->depth = depth;
- if (lenx <= MAX_LEFT_LEN) result->left_len = lenx;
+ if (lenx <= MAX_LEFT_LEN)
+ result->left_len = (unsigned char)lenx;
result->len = result_len;
result->left = x;
result->right = y;
@@ -262,7 +263,8 @@ CORD CORD_cat(CORD x, CORD y)
if (result == 0) OUT_OF_MEMORY;
result->header = CONCAT_HDR;
result->depth = depth;
- if (lenx <= MAX_LEFT_LEN) result->left_len = lenx;
+ if (lenx <= MAX_LEFT_LEN)
+ result->left_len = (unsigned char)lenx;
result->len = result_len;
result->left = x;
result->right = y;