Project

General

Profile

Actions

Bug #13529

closed

Warning when compiling io.c

Added by duerst (Martin Dürst) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-05-01 trunk 58527) [x86_64-cygwin]
[ruby-core:<unknown>]

Description

I get the warning below when trying to compile trunk on cygwin:

compiling io.c
io.c: In function ‘do_io_advise’:
io.c:8869:29: warning: format ‘%lld’ expects argument of type ‘long long int’, b                              ut argument 3 has type ‘off_t {aka long int}’ [-Wformat=]
  VALUE message = rb_sprintf("%"PRIsVALUE" "

Updated by nobu (Nobuyoshi Nakada) almost 7 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback

How did you configure it?

I can't reproduce it, and rb_cv_off_t_convertible seems properly configured as LONG.

$ sed -i /off_t/d config.cache 

$ make reconfig | grep off_t
checking for off_t... yes
checking size of off_t... 8
checking for convertible type of off_t... LONG

$ grep off_t config.cache
ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8}
ac_cv_type_off_t=${ac_cv_type_off_t=yes}
rb_cv_off_t_convertible=${rb_cv_off_t_convertible=LONG}

$ grep OFFT .ext/include/x86_64-cygwin/ruby/config.h 
#define OFFT2NUM(v) LONG2NUM(v)
#define NUM2OFFT(v) NUM2LONG(v)
#define PRI_OFFT_PREFIX PRI_LONG_PREFIX

$ rm io.o; make io.o
compiling ../src/io.c

Updated by duerst (Martin Dürst) almost 7 years ago

  • Status changed from Feedback to Closed

This seems to have been a temporary issue. For the commands above, I get the same results now. Closing.

Actions

Also available in: Atom PDF

Like0
Like0Like0