Skip to content

Commit

Permalink
fixed warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
  • Loading branch information
Christoph M. Wintersteiger committed Oct 24, 2014
1 parent fd0920e commit 7d19620
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ src/util/version.h
src/api/java/Native.cpp
src/api/java/Native.java
src/api/java/enumerations/*.java
*.bak
6 changes: 3 additions & 3 deletions src/util/mpz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ bool mpz_manager<SYNCH>::is_power_of_two(mpz const & a, unsigned & shift) {
return false;
if (is_small(a)) {
if (::is_power_of_two(a.m_val)) {
shift = ::log2(a.m_val);
shift = ::log2((unsigned)a.m_val);
return true;
}
else {
Expand Down Expand Up @@ -1838,7 +1838,7 @@ unsigned mpz_manager<SYNCH>::log2(mpz const & a) {
if (is_nonpos(a))
return 0;
if (is_small(a))
return ::log2(a.m_val);
return ::log2((unsigned)a.m_val);
#ifndef _MP_GMP
COMPILE_TIME_ASSERT(sizeof(digit_t) == 8 || sizeof(digit_t) == 4);
mpz_cell * c = a.m_ptr;
Expand All @@ -1860,7 +1860,7 @@ unsigned mpz_manager<SYNCH>::mlog2(mpz const & a) {
if (is_nonneg(a))
return 0;
if (is_small(a))
return ::log2(-a.m_val);
return ::log2((unsigned)-a.m_val);
#ifndef _MP_GMP
COMPILE_TIME_ASSERT(sizeof(digit_t) == 8 || sizeof(digit_t) == 4);
mpz_cell * c = a.m_ptr;
Expand Down

0 comments on commit 7d19620

Please sign in to comment.