Skip to content

Commit

Permalink
Merge pull request #11 from ggtakec/master
Browse files Browse the repository at this point in the history
Updated files for release 1.0.66
  • Loading branch information
ggtakec authored Dec 26, 2018
2 parents 8f5a239 + 6e1e869 commit bbbda9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
chmpx (1.0.66) unstable; urgency=low

* Fixed build warning about comparison of pointer with integer

-- Takeshi Nakatani <[email protected]> Wed, 26 Dec 2018 17:30:12 +0900

chmpx (1.0.65) unstable; urgency=low

* Updated common build tool files
Expand Down
6 changes: 3 additions & 3 deletions lib/chmcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ template<typename T> inline bool CHMEMPTYSTR(const T& pstr)
#define CHMPXSTRJOIN(first, second) first ## second

#if defined(__cplusplus)
#define CHM_OFFSET(baseaddr, offset, type) (offset > 0 ? reinterpret_cast<type>(reinterpret_cast<off_t>(baseaddr) + offset) : reinterpret_cast<type>(baseaddr)) // convert pointer with offset
#define CHM_ABS(baseaddr, offset, type) (offset > 0 ? reinterpret_cast<type>(reinterpret_cast<off_t>(baseaddr) + reinterpret_cast<off_t>(offset)) : 0) // To Absorute address
#define CHM_REL(baseaddr, address, type) (address > 0 ? reinterpret_cast<type>(reinterpret_cast<off_t>(address) - reinterpret_cast<off_t>(baseaddr)) : 0) // To Relative address
#define CHM_OFFSET(baseaddr, offset, type) (offset > 0 ? reinterpret_cast<type>(reinterpret_cast<off_t>(baseaddr) + offset) : reinterpret_cast<type>(baseaddr)) // convert pointer with offset
#define CHM_ABS(baseaddr, offset, type) (reinterpret_cast<off_t>(offset) > 0 ? reinterpret_cast<type>(reinterpret_cast<off_t>(baseaddr) + reinterpret_cast<off_t>(offset)) : 0) // To Absorute address
#define CHM_REL(baseaddr, address, type) (address > 0 ? reinterpret_cast<type>(reinterpret_cast<off_t>(address) - reinterpret_cast<off_t>(baseaddr)) : 0) // To Relative address
#else // __cplusplus
#define CHM_OFFSET(baseaddr, offset, type) (offset > 0 ? (type)((off_t)baseaddr + offset) : (type)baseaddr) // convert pointer with offset
#define CHM_ABS(baseaddr, offset, type) (offset > 0 ? (type)((off_t)baseaddr + (off_t)offset) : 0) // To Absorute address
Expand Down

0 comments on commit bbbda9f

Please sign in to comment.