summaryrefslogtreecommitdiff
path: root/mysys/stacktrace.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
commit6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch)
tree3603f88e1b3bd1e622edb182cccd882dd31ddc8a /mysys/stacktrace.c
parentf271100836d8a91a775894ec36b869a66a3145e5 (diff)
downloadmariadb-git-6c279ad6a71c63cb595fde7c951aadb31c3dbebc.tar.gz
MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
Diffstat (limited to 'mysys/stacktrace.c')
-rw-r--r--mysys/stacktrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c
index 398ade7ad59..cc759d38664 100644
--- a/mysys/stacktrace.c
+++ b/mysys/stacktrace.c
@@ -70,7 +70,7 @@ static void print_buffer(char *buffer, size_t count)
@return Zero on success.
*/
-static int safe_print_str(const char *addr, int max_len)
+static int safe_print_str(const char *addr, size_t max_len)
{
int fd;
pid_t tid;
@@ -147,7 +147,7 @@ static int safe_print_str(const char *addr, int max_len)
returns 1, it does not mean 100% that the pointer is corrupted.
*/
-int my_safe_print_str(const char* val, int max_len)
+int my_safe_print_str(const char* val, size_t max_len)
{
char *heap_end;
@@ -763,7 +763,7 @@ void my_write_core(int unused)
}
-int my_safe_print_str(const char *val, int len)
+int my_safe_print_str(const char *val, size_t len)
{
__try
{
@@ -780,7 +780,7 @@ int my_safe_print_str(const char *val, int len)
size_t my_write_stderr(const void *buf, size_t count)
{
- return (size_t) write(fileno(stderr), buf, count);
+ return (size_t) write(fileno(stderr), buf, (uint)count);
}