Warnings: Difference between revisions

From vice-emu
Jump to navigation Jump to search
Line 14: Line 14:


== clang ==
== clang ==
* gpz (OSX, clang) (r31044)
<pre>
Making all in joyport
joystick.c:714:5: warning: implicit declaration of function 'kbd_initialize_numpad_joykeys' is invalid in C99 [-Wimplicit-function-declaration]
    kbd_initialize_numpad_joykeys(joykeys[0]);
    ^
1 warning generated.
Making all in sounddrv
soundcoreaudio.c:247:11: warning: 'AudioHardwareGetProperty' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]
    err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,
          ^
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareDeprecated.h:327:1: note: 'AudioHardwareGetProperty' declared here
AudioHardwareGetProperty(  AudioHardwarePropertyID inPropertyID,
^
Making all in view
driveview.m:219:19: warning: multiple methods named 'tag' found
    int command = [sender tag];
                  ^~~~~~~~~~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:306:1: note: using
- (NSInteger)tag;
^~~~~~~~~~~~~~~~~
driveview.m:229:1: note: also found
- (int)tag
^~~~~~~~~~
driveview.m:229:1: warning: conflicting return type in implementation of 'tag': 'NSInteger' (aka 'long') vs 'int' [-Wmismatched-return-types]
- (int)tag
^  ~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:306:1: note: previous definition is here
- (NSInteger)tag;
^  ~~~~~~~~~
2 warnings generated.
soundview.m:63:31: warning: incompatible pointer types sending 'NSAttributedString *' to parameter of type 'NSString *' [-Wincompatible-pointer-types]
    [minVolume setStringValue:[[NSAttributedString alloc] initWithRTF:rtfMinVolString documentAttributes:NULL]];
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h:227:1: note: instance method 'initWithRTF:documentAttributes:' is assumed to return an
      instance of its receiver type ('NSAttributedString *')
- (id)initWithRTF:(NSData *)data documentAttributes:(NSDictionary **)dict;
^
/System/Library/Frameworks/AppKit.framework/Headers/NSControl.h:63:36: note: passing argument to parameter 'aString' here
- (void)setStringValue:(NSString *)aString;
                                  ^
soundview.m:73:31: warning: incompatible pointer types sending 'NSAttributedString *' to parameter of type 'NSString *' [-Wincompatible-pointer-types]
    [maxVolume setStringValue:[[NSAttributedString alloc] initWithRTF:rtfMaxVolString documentAttributes:NULL]];
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h:227:1: note: instance method 'initWithRTF:documentAttributes:' is assumed to return an
      instance of its receiver type ('NSAttributedString *')
- (id)initWithRTF:(NSData *)data documentAttributes:(NSDictionary **)dict;
^
/System/Library/Frameworks/AppKit.framework/Headers/NSControl.h:63:36: note: passing argument to parameter 'aString' here
- (void)setStringValue:(NSString *)aString;
                                  ^
2 warnings generated.
Making all in menu
viceappcontroller.m:191:35: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        NSString * path = [[panel filename] stringByAppendingPathExtension:[extensions objectAtIndex:type]];
                                  ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
viceappcontroller.m:315:34: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        NSString * path = [panel filename];
                                ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
2 warnings generated.
vicemachinecontroller.m:77:27: warning: 'createDirectoryAtPath:attributes:' is deprecated [-Wdeprecated-declarations]
        if (![fileManager createDirectoryAtPath:prefPath attributes:nil]) {
                          ^
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:172:1: note: method 'createDirectoryAtPath:attributes:' declared here
- (BOOL)createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes NS_DEPRECATED(10_0, 10_5, 2_0, 2_0);
^
vicemachinecontroller.m:410:26: warning: 'removeFileAtPath:handler:' is deprecated [-Wdeprecated-declarations]
            [fileManager removeFileAtPath:newPath handler:nil];
                        ^
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:178:1: note: method 'removeFileAtPath:handler:' declared here
- (BOOL)removeFileAtPath:(NSString *)path handler:(id)handler NS_DEPRECATED(10_0, 10_5, 2_0, 2_0);
^
vicemachinecontroller.m:413:30: warning: 'movePath:toPath:handler:' is deprecated [-Wdeprecated-declarations]
                [fileManager movePath:oldPath toPath:newPath handler:nil];
                            ^
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:177:1: note: method 'movePath:toPath:handler:' declared here
- (BOOL)movePath:(NSString *)src toPath:(NSString *)dest handler:(id)handler NS_DEPRECATED(10_0, 10_5, 2_0, 2_0);
^
vicemachinecontroller.m:759:9: warning: implicit declaration of function 'charset_petconvstring' is invalid in C99 [-Wimplicit-function-declaration]
        charset_petconvstring(pstr,0);
        ^
vicemachinecontroller.m:761:9: warning: implicit declaration of function 'kbdbuf_feed' is invalid in C99 [-Wimplicit-function-declaration]
        kbdbuf_feed(pstr);
        ^
5 warnings generated.
vicefilepanel.m:194:24: warning: sending 'VICEFilePanel *' to parameter of incompatible type 'id<NSOpenSavePanelDelegate>'
    [panel setDelegate:self];
                      ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:130:50: note: passing argument to parameter 'delegate' here
- (void)setDelegate:(id<NSOpenSavePanelDelegate>)delegate;
                                                ^
vicefilepanel.m:224:27: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        fileName = [panel filename];
                          ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
vicefilepanel.m:229:30: warning: comparison of constant 'NSNotFound' (9223372036854775807) with expression of type 'unsigned int' is always true
      [-Wtautological-constant-out-of-range-compare]
            if(contentsIndex != NSNotFound) {
              ~~~~~~~~~~~~~ ^  ~~~~~~~~~~
vicefilepanel.m:275:23: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        return [panel filename];
                      ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
vicefilepanel.m:291:23: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        return [panel filename];
                      ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
vicefilepanel.m:312:23: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        return [panel filename];
                      ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
vicefilepanel.m:330:23: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        return [panel filename];
                      ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
vicefilepanel.m:345:23: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        return [panel filename];
                      ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
vicefilepanel.m:382:37: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        NSString *filename = [panel filename];
                                    ^
/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:278:1: note: method 'filename' declared here
- (NSString *)filename NS_DEPRECATED_MAC(10_0, 10_6);
^
9 warnings generated.
Making all in dialog
disassemblywindowcontroller.m:62:26: warning: sending 'DisassemblyWindowController *' to parameter of incompatible type 'id<NSMenuDelegate>'
    [theMenu setDelegate:self];
                        ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSMenu.h:150:42: note: passing argument to parameter 'anObject' here
- (void)setDelegate:(id <NSMenuDelegate>)anObject;
                                        ^
disassemblywindowcontroller.m:255:32: warning: sending 'DisassemblyWindowController *' to parameter of incompatible type 'id<NSTableViewDataSource>'
    [memoryTable setDataSource:self];
                              ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSTableView.h:102:51: note: passing argument to parameter 'aSource' here
- (void)setDataSource:(id <NSTableViewDataSource>)aSource;
                                                  ^
2 warnings generated.
iotreewindowcontroller.m:62:27: warning: sending 'IOTreeWindowController *' to parameter of incompatible type 'id<NSOutlineViewDelegate>'
    [treeView setDelegate:self];
                          ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSOutlineView.h:125:49: note: passing argument to parameter 'anObject' here
- (void)setDelegate:(id <NSOutlineViewDelegate>)anObject;
                                                ^
iotreewindowcontroller.m:63:29: warning: sending 'IOTreeWindowController *' to parameter of incompatible type 'id<NSOutlineViewDataSource>'
    [treeView setDataSource:self];
                            ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSOutlineView.h:128:53: note: passing argument to parameter 'aSource' here
- (void)setDataSource:(id <NSOutlineViewDataSource>)aSource;
                                                    ^
2 warnings generated.
memorywindowcontroller.m:95:32: warning: sending 'MemoryWindowController *' to parameter of incompatible type 'id<NSTableViewDataSource>'
    [memoryTable setDataSource:self];
                              ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSTableView.h:102:51: note: passing argument to parameter 'aSource' here
- (void)setDataSource:(id <NSTableViewDataSource>)aSource;
                                                  ^
1 warning generated.
registerwindowcontroller.m:75:34: warning: sending 'RegisterWindowController *' to parameter of incompatible type 'id<NSTableViewDataSource>'
    [registerTable setDataSource:self];
                                ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSTableView.h:102:51: note: passing argument to parameter 'aSource' here
- (void)setDataSource:(id <NSTableViewDataSource>)aSource;
                                                  ^
registerwindowcontroller.m:125:18: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
        if(flags & 1 == 1)  {
                ^~~~~~~~
registerwindowcontroller.m:125:18: note: place parentheses around the '==' expression to silence this warning
        if(flags & 1 == 1)  {
                ^
                  (    )
registerwindowcontroller.m:125:18: note: place parentheses around the & expression to evaluate it first
        if(flags & 1 == 1)  {
                ^
          (        )
2 warnings generated.
resourceeditorcontroller.m:64:27: warning: sending 'ResourceEditorController *' to parameter of incompatible type 'id<NSOutlineViewDelegate>'
    [treeView setDelegate:self];
                          ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSOutlineView.h:125:49: note: passing argument to parameter 'anObject' here
- (void)setDelegate:(id <NSOutlineViewDelegate>)anObject;
                                                ^
resourceeditorcontroller.m:65:29: warning: sending 'ResourceEditorController *' to parameter of incompatible type 'id<NSOutlineViewDataSource>'
    [treeView setDataSource:self];
                            ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSOutlineView.h:128:53: note: passing argument to parameter 'aSource' here
- (void)setDataSource:(id <NSOutlineViewDataSource>)aSource;
                                                    ^
2 warnings generated.
recordmediawindowcontroller.m:49:26: warning: using 'stringWithString:' with a literal is redundant [-Wobjc-redundant-literal-use]
    NSString *fileName = [NSString stringWithString:@"~/capture"];
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
viceapplication.m:94:51: warning: 'IOTreeWindowController' may not respond to 'initWithMemSpace:'
    cpuIOTreeWC = [[IOTreeWindowController alloc] initWithMemSpace:e_comp_space];
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
1 warning generated.
vicemachine.m:232:17: warning: implicit declaration of function 'monitor_startup_trap' is invalid in C99 [-Wimplicit-function-declaration]
                monitor_startup_trap();
                ^
1 warning generated.
video.m:48:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
video.m:137:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
video.m:210:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
video.m:383:5: warning: implicit declaration of function 'video_render_setrawalpha' is invalid in C99 [-Wimplicit-function-declaration]
    video_render_setrawalpha(0xff000000);
    ^
4 warnings generated.
Making all in platform
platform_macosx.c:61:16: warning: 'Gestalt' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
    if ((err = Gestalt(gestaltSystemVersion, &systemVersion)) != noErr) {
              ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Gestalt.h:123:1: note: 'Gestalt' declared here
Gestalt(
^
platform_macosx.c:76:20: warning: 'Gestalt' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
        if ((err = Gestalt(gestaltSystemVersionMajor, &versionMajor)) != noErr) {
                  ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Gestalt.h:123:1: note: 'Gestalt' declared here
Gestalt(
^
platform_macosx.c:79:20: warning: 'Gestalt' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
        if ((err = Gestalt(gestaltSystemVersionMinor, &versionMinor)) != noErr) {
                  ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Gestalt.h:123:1: note: 'Gestalt' declared here
Gestalt(
^
platform_macosx.c:82:20: warning: 'Gestalt' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
        if ((err = Gestalt(gestaltSystemVersionBugFix, &versionBugFix)) != noErr) {
                  ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Gestalt.h:123:1: note: 'Gestalt' declared here
Gestalt(
^
4 warnings generated.
In file included from info.c:33:
./infocontrib.h:224:8: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Andr<E9> Fachat <fachat@physik.tu-chemnitz.de>\n"
      ^~~~
./infocontrib.h:274:12: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Paul Dub<E9> \n"
          ^~~~
./infocontrib.h:435:11: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Frank K<F6>nig <frank_koenig@t-online.de>\n"
          ^~~~
./infocontrib.h:465:11: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Marko M<E4>kel<E4> <msmakela@gmail.com>\n"
          ^~~~  ~~~~
./infocontrib.h:499:10: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Lasse <D6><F6>rni <loorni@mail.student.oulu.fi>\n"
        ^~~~~~~~
./infocontrib.h:523:14: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Pablo Rold<E1>n <pdroldan@yahoo.com>\n"
            ^~~~
./infocontrib.h:619:8: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Istv<E1>n F<E1>bi<E1>n\n"
      ^~~~  ~~~~  ~~~~
./infocontrib.h:665:19: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Peternel, Per H<E5>kan Sundell and David Horrocks for writing\n"
                  ^~~~
./infocontrib.h:704:25: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "1996-2001", "Andr<E9> Fachat", "Andr<E9> Fachat <fachat@physik.tu-chemnitz.de>" },
                        ^~~~
./infocontrib.h:704:41: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "1996-2001", "Andr<E9> Fachat", "Andr<E9> Fachat <fachat@physik.tu-chemnitz.de>" },
                                          ^~~~
./infocontrib.h:716:29: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "2004-2016", "Paul Dub<E9>", "French", "Paul Dub<E9> " },
                            ^~~~
./infocontrib.h:716:52: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "2004-2016", "Paul Dub<E9>", "French", "Paul Dub<E9> " },
                                                      ^~~~
</pre>
* gpz (x86, Linux/Gentoo, 64bit, clang, GnomeUI) (r31056)
(warnings from ffmpeg have been omitted)
<pre>
In file included from info.c:33:
./infocontrib.h:224:8: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Andr<E9> Fachat <fachat@physik.tu-chemnitz.de>\n"
      ^~~~
./infocontrib.h:274:12: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Paul Dub<E9> \n"
          ^~~~
./infocontrib.h:435:11: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Frank K<F6>nig <frank_koenig@t-online.de>\n"
          ^~~~
./infocontrib.h:465:11: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Marko M<E4>kel<E4> <msmakela@gmail.com>\n"
          ^~~~  ~~~~
./infocontrib.h:499:10: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Lasse <D6><F6>rni <loorni@mail.student.oulu.fi>\n"
        ^~~~~~~~
./infocontrib.h:523:14: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Pablo Rold<E1>n <pdroldan@yahoo.com>\n"
            ^~~~
./infocontrib.h:619:8: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Istv<E1>n F<E1>bi<E1>n\n"
      ^~~~  ~~~~  ~~~~
./infocontrib.h:665:19: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Peternel, Per H<E5>kan Sundell and David Horrocks for writing\n"
                  ^~~~
./infocontrib.h:704:25: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "1996-2001", "Andr<E9> Fachat", "Andr<E9> Fachat <fachat@physik.tu-chemnitz.de>" },
                        ^~~~
./infocontrib.h:704:41: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "1996-2001", "Andr<E9> Fachat", "Andr<E9> Fachat <fachat@physik.tu-chemnitz.de>" },
                                          ^~~~
./infocontrib.h:716:29: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "2004-2016", "Paul Dub<E9>", "French", "Paul Dub<E9> " },
                            ^~~~
./infocontrib.h:716:52: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "2004-2016", "Paul Dub<E9>", "French", "Paul Dub<E9> " },
                                                      ^~~~
</pre>

Revision as of 18:57, 19 May 2018

GCC

  • gpz (x86, Linux/Gentoo, 64bit, GCC 6.4.0, GTK3) (3.2 tarball)
./configure --program-prefix=gtk3- --enable-debug --enable-native-gtk3ui --enable-debug-gtk3ui --enable-native-tools --enable-arch=native --prefix=/usr/games/ --enable-parsid --with-midas --with-resid --with-xaw3d --with-arts --with-x --enable-ethernet --with-pulse --with-sdlsound --enable-fullscreen --enable-cpuhistory --enable-static-ffmpeg --enable-static-lame

no warnings besides a bunch of ffmpeg related things that are not listed here (we dont fix them)

-

clang