Ticket #35061

Macでビルド時の警告

Eröffnet am: 2015-04-11 22:57 Letztes Update: 2015-04-11 22:57

Auswertung:
(Anonym)
Verantwortlicher:
(Keine)
Typ:
Status:
Offen
Komponente:
(Keine)
Meilenstein:
(Keine)
Priorität:
3
Schweregrad:
2
Lösung:
Keine
Datei:
Keine

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-Verlauf (1/1 Historien)

2015-04-11 22:57 Aktualisiert von: None
  • New Ticket "Macでビルド時の警告" created

Dateianhangliste

Keine Anhänge

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden