Ticket #35061

Macでビルド時の警告

Open Date: 2015-04-11 22:57 Last Update: 2021-04-25 19:24

Reporter:
(Anonymous)
Owner:
Type:
Status:
Closed
Component:
(None)
Priority:
3
Severity:
2
Resolution:
Duplicate
File:
None

Details

OS Xの標準CCでビルドしたところ、3ヶ所ほど警告が出ました。

makeのログ:

Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
./gcc-wrap gcc -DHAVE_CONFIG_H -I.     -Wno-invalid-source-encoding -MT z-term.o -MD -MP -MF .deps/z-term.Tpo -c -o z-term.o z-term.c
In file included from z-term.c:12:
In file included from ./angband.h:45:
./defines.h:2543:1: warning: '/*' within block comment [-Wcomment]
/*
^
(大部分の*.cで同様)


./gcc-wrap gcc -DHAVE_CONFIG_H -I.     -Wno-invalid-source-encoding -MT files.o -MD -MP -MF .deps/files.Tpo -c -o files.o files.c
files.c:6364:20: warning: expression which evaluates to zero treated as a null pointer constant of type 'time_t *' (aka 'long *') [-Wnon-literal-null-conversion]
                time_t ct = time((time_t)0);
                                 ^~~~~~~~~


./gcc-wrap gcc -DHAVE_CONFIG_H -I.     -Wno-invalid-source-encoding -MT cmd4.o -MD -MP -MF .deps/cmd4.Tpo -c -o cmd4.o cmd4.c
cmd4.c:569:55: warning: data argument not used by format string [-Wformat-extra-args]
                                                        hour, min, note_level, _(n, note), _(note, n), _("", get_ordinal_number_suffix(n)));
                                                                                                       ^
./defines.h:5610:29: note: expanded from macro '_'
#define _(JAPANESE,ENGLISH) (JAPANESE)
                            ^
cmd4.c:573:76: warning: data argument not used by format string [-Wformat-extra-args]
                                                hour, min, note_level, num, _(note, get_ordinal_number_suffix(num)), note);
                                                                                                                     ^

./gcc-wrap gcc -DHAVE_CONFIG_H -I.     -Wno-invalid-source-encoding -MT chuukei.o -MD -MP -MF .deps/chuukei.Tpo -c -o chuukei.o chuukei.c
In file included from chuukei.c:9:
In file included from ./angband.h:45:
./defines.h:2543:1: warning: '/*' within block comment [-Wcomment]
/*
^
chuukei.c:143:2: warning: implicit declaration of function 'gettimeofday' is invalid in C99 [-Wimplicit-function-declaration]
        gettimeofday(&tv, NULL);
        ^

確認した環境:

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix

$ xcodebuild -version
Xcode 6.2
Build version 6C131e

Ticket History (3/6 Histories)

2015-04-11 22:57 Updated by: None
  • New Ticket "Macでビルド時の警告" created
2020-02-23 03:32 Updated by: deskull
  • Details Updated
Comment

Macというよりはgcc上の警告であるのことを意識しつつ、問題ではあるので、 #40045 共々直す。

2020-02-23 03:32 Updated by: deskull
2020-12-16 19:34 Updated by: deskull
Comment

GCC周りをhabuさんに直してもらっている間に直っているかもしれない。要調査。

2021-04-01 09:01 Updated by: None
2021-04-25 19:24 Updated by: hourier
  • Resolution Update from None to Duplicate
  • Status Update from Open to Closed
Comment

OSX 環境での開発はフォークされて続いているので本件はクローズする
https://osdn.net/projects/hengbandforosx/

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login