summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-simple.c4
-rw-r--r--strings/decimal.c16
-rw-r--r--strings/my_vsnprintf.c1
3 files changed, 10 insertions, 11 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index d671f425201..f962b4f77cf 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -1547,7 +1547,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
}
}
- digits= str - beg;
+ digits= (int) (str - beg);
/* Continue to accumulate into ulonglong */
for (dot= NULL, ull= ul; str < end; str++)
@@ -1584,7 +1584,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
}
else
{
- shift= dot - str;
+ shift= (int) (dot - str);
for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++);
}
goto exp;
diff --git a/strings/decimal.c b/strings/decimal.c
index b1bd86f3f29..8cd5c93e84b 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -32,7 +32,7 @@
integer that determines the number of significant digits in a
particular radix R, where R is either 2 or 10. S is a non-negative
integer. Every value of an exact numeric type of scale S is of the
- form n*10^{-S}, where n is an integer such that �-R^P <= n <= R^P.
+ form n*10^{-S}, where n is an integer such that -R^P <= n <= R^P.
[...]
@@ -257,7 +257,7 @@ void max_decimal(int precision, int frac, decimal_t *to)
}
-static dec1 *remove_leading_zeroes(decimal_t *from, int *intg_result)
+static dec1 *remove_leading_zeroes(const decimal_t *from, int *intg_result)
{
int intg= from->intg, i;
dec1 *buf0= from->buf;
@@ -335,7 +335,7 @@ int decimal_actual_fraction(decimal_t *from)
E_DEC_OK/E_DEC_TRUNCATED/E_DEC_OVERFLOW
*/
-int decimal2string(decimal_t *from, char *to, int *to_len,
+int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals,
char filler)
{
@@ -952,7 +952,7 @@ fatal_error:
E_DEC_OK
*/
-int decimal2double(decimal_t *from, double *to)
+int decimal2double(const decimal_t *from, double *to)
{
double result= 0.0;
int i, exp= 0;
@@ -1044,7 +1044,7 @@ int longlong2decimal(longlong from, decimal_t *to)
return ull2dec(from, to);
}
-int decimal2ulonglong(decimal_t *from, ulonglong *to)
+int decimal2ulonglong(const decimal_t *from, ulonglong *to)
{
dec1 *buf=from->buf;
ulonglong x=0;
@@ -1073,7 +1073,7 @@ int decimal2ulonglong(decimal_t *from, ulonglong *to)
return E_DEC_OK;
}
-int decimal2longlong(decimal_t *from, longlong *to)
+int decimal2longlong(const decimal_t *from, longlong *to)
{
dec1 *buf=from->buf;
longlong x=0;
@@ -1192,7 +1192,7 @@ int decimal2longlong(decimal_t *from, longlong *to)
7E F2 04 37 2D FB 2D
*/
-int decimal2bin(decimal_t *from, uchar *to, int precision, int frac)
+int decimal2bin(const decimal_t *from, uchar *to, int precision, int frac)
{
dec1 mask=from->sign ? -1 : 0, *buf1=from->buf, *stop1;
int error=E_DEC_OK, intg=precision-frac,
@@ -1489,7 +1489,7 @@ int decimal_bin_size(int precision, int scale)
*/
int
-decimal_round(decimal_t *from, decimal_t *to, int scale,
+decimal_round(const decimal_t *from, decimal_t *to, int scale,
decimal_round_mode mode)
{
int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1,
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index f2dd3f8e525..685b65b7bc4 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -635,4 +635,3 @@ size_t my_snprintf(char* to, size_t n, const char* fmt, ...)
va_end(args);
return result;
}
-