changeset 267:2c0544dede57

Bug 3570: Build warning on Arm box Reviewed-by: ykubota https://github.com/HeapStats/heapstats/pull/139
author Yasumasa Suenaga <yasuenag@gmail.com>
date Sun, 08 Apr 2018 21:58:08 +0900
parents c5eaa1394c8e
children 47afd5309aa8
files ChangeLog agent/src/arch/arm/heapstats_md_arm.cpp
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Apr 04 17:15:38 2018 +0900
+++ b/ChangeLog	Sun Apr 08 21:58:08 2018 +0900
@@ -1,3 +1,7 @@
+2018-04-08 Yasumasa Suenaga <yasuenag@gmail.com>
+
+	* Bug 3570: Build warning on Arm box
+
 2018-04-04 Yasumasa Suenaga <yasuenag@gmail.com>
 
 	* Bug 3568: Up to version 2.2 for trunk repo
--- a/agent/src/arch/arm/heapstats_md_arm.cpp	Wed Apr 04 17:15:38 2018 +0900
+++ b/agent/src/arch/arm/heapstats_md_arm.cpp	Sun Apr 08 21:58:08 2018 +0900
@@ -2,7 +2,7 @@
  * \file heapstats_md_arm.cpp
  * \brief Proxy library for HeapStats backend.
  *        This file implements ARM specific code for loading backend library.
- * Copyright (C) 2015 Yasumasa Suenaga
+ * Copyright (C) 2015-2018 Yasumasa Suenaga
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -48,10 +48,10 @@
  */
 static int findHeapStatsCallback(struct dl_phdr_info *info, size_t size,
                                  void *data) {
-  ptrdiff_t this_func_addr = (ptrdiff_t)&findHeapStatsCallback;
+  uintptr_t this_func_addr = (uintptr_t)&findHeapStatsCallback;
 
   for (int idx = 0; idx < info->dlpi_phnum; idx++) {
-    ptrdiff_t base_addr = info->dlpi_addr + info->dlpi_phdr[idx].p_vaddr;
+    uintptr_t base_addr = info->dlpi_addr + info->dlpi_phdr[idx].p_vaddr;
 
     if ((this_func_addr >= base_addr) &&
         (this_func_addr <= base_addr + info->dlpi_phdr[idx].p_memsz)) {