Project

General

Profile

Bug #1320

sdbm.c compiler warnings

Added by cfis (Charlie Savage) over 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.2dev (2009-03-28) [i386-mswin32_90]
[ruby-core:23039]

Description

=begin
A couple of compiler warnings are still left in sdbm extension:

cl -nologo -I. -I../../.ext/include/i386-mswin32_90 -I../.././../include -I../.././../ext/sdbm -nologo -MDd -Zi -RTC1 -W3 -wd4996 -Od -Zm600 -DRUBY_EXTCONF_H=\"extconf.h\" -I. -I./.. -I./../missing
-IC:\Development\msvc\include -Fo_sdbm.obj -c -Tc../.././../ext/sdbm/_sdbm.c _sdbm.c

../.././../ext/sdbm/_sdbm.c(207) : warning C4133: 'function' : incompatible types - from '_stat64 *' to 'stat *'

../.././../ext/sdbm/sdbm.c(214) : warning C4244: '=' : conversion from '_int64' to 'long', possible loss of data
=end

Associated revisions

Revision 9b09cc8a
Added by mrkn (Kenta Murata) 7 months ago

bignum.c, numeric.c: add Integer#pow(b, m)

This commit is based on the pull-request #1320 created by Makoto Kishimoto.
[Feature #12508] [Feature #11003] [close GH-1320]

  • bignum.c (rb_int_powm): Added for Integer#pow(b, m).

  • internal.h (rb_int_powm): Declared to refer in numeric.c.

  • bignum.c (bary_powm_gmp): Added for Integer#pow(b, m) using GMP.

  • bignum.c (int_pow_tmp1): Added for implementing Integer#pow(b, m).

  • bignum.c (int_pow_tmp2, int_pow_tmp3): ditto.

  • internal.h (rb_num_positive_int_p): Moved from numeric.c for sharing
    the definition with bignum.c.

  • internal.h (rb_num_negative_int_p, rb_num_compare_with_zero): ditto.

  • numeric.c(negative_int_p): Moved to internal.h for sharing the
    definition with bignum.c.

  • numeric.c (positive_int_p, compare_with_zero): ditto.

  • numeric.c (rb_int_odd_p): Exported (renamed from int_odd_p).

  • internal.h (rb_int_odd_p): ditto.

  • internal.h (HALF_LONG_MSB): Added.

  • numeric.c (SQRT_LONG_MAX): Redefined by using HALF_LONG_MSB.

  • test/ruby/test_numeric.rb (test_pow): Added for Integer#pow(b, m).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 61003
Added by mrkn (Kenta Murata) 7 months ago

bignum.c, numeric.c: add Integer#pow(b, m)

This commit is based on the pull-request #1320 created by Makoto Kishimoto.
[Feature #12508] [Feature #11003] [close GH-1320]

  • bignum.c (rb_int_powm): Added for Integer#pow(b, m).

  • internal.h (rb_int_powm): Declared to refer in numeric.c.

  • bignum.c (bary_powm_gmp): Added for Integer#pow(b, m) using GMP.

  • bignum.c (int_pow_tmp1): Added for implementing Integer#pow(b, m).

  • bignum.c (int_pow_tmp2, int_pow_tmp3): ditto.

  • internal.h (rb_num_positive_int_p): Moved from numeric.c for sharing
    the definition with bignum.c.

  • internal.h (rb_num_negative_int_p, rb_num_compare_with_zero): ditto.

  • numeric.c(negative_int_p): Moved to internal.h for sharing the
    definition with bignum.c.

  • numeric.c (positive_int_p, compare_with_zero): ditto.

  • numeric.c (rb_int_odd_p): Exported (renamed from int_odd_p).

  • internal.h (rb_int_odd_p): ditto.

  • internal.h (HALF_LONG_MSB): Added.

  • numeric.c (SQRT_LONG_MAX): Redefined by using HALF_LONG_MSB.

  • test/ruby/test_numeric.rb (test_pow): Added for Integer#pow(b, m).

Revision 61003
Added by mrkn (Kenta Murata) 7 months ago

bignum.c, numeric.c: add Integer#pow(b, m)

This commit is based on the pull-request #1320 created by Makoto Kishimoto.
[Feature #12508] [Feature #11003] [close GH-1320]

  • bignum.c (rb_int_powm): Added for Integer#pow(b, m).

  • internal.h (rb_int_powm): Declared to refer in numeric.c.

  • bignum.c (bary_powm_gmp): Added for Integer#pow(b, m) using GMP.

  • bignum.c (int_pow_tmp1): Added for implementing Integer#pow(b, m).

  • bignum.c (int_pow_tmp2, int_pow_tmp3): ditto.

  • internal.h (rb_num_positive_int_p): Moved from numeric.c for sharing
    the definition with bignum.c.

  • internal.h (rb_num_negative_int_p, rb_num_compare_with_zero): ditto.

  • numeric.c(negative_int_p): Moved to internal.h for sharing the
    definition with bignum.c.

  • numeric.c (positive_int_p, compare_with_zero): ditto.

  • numeric.c (rb_int_odd_p): Exported (renamed from int_odd_p).

  • internal.h (rb_int_odd_p): ditto.

  • internal.h (HALF_LONG_MSB): Added.

  • numeric.c (SQRT_LONG_MAX): Redefined by using HALF_LONG_MSB.

  • test/ruby/test_numeric.rb (test_pow): Added for Integer#pow(b, m).

History

#1 Updated by yugui (Yuki Sonoda) about 9 years ago

  • Priority changed from Normal to 3
  • Target version changed from 1.9.1 to 1.9.2

=begin

=end

#2 Updated by yugui (Yuki Sonoda) almost 9 years ago

  • Assignee set to matz (Yukihiro Matsumoto)

=begin

=end

#3 Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Status changed from Open to Closed

=begin
can't reproduce with VC9 and r27729.
maybe already fixed.
=end

#4 Updated by nobu (Nobuyoshi Nakada) about 8 years ago

  • Status changed from Closed to Open

=begin
It needs -W3 option to reproduce.
=end

#5 Updated by nobu (Nobuyoshi Nakada) about 8 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27730.
Charlie, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF