Warnings

From vice-emu
Revision as of 16:44, 19 October 2018 by Compyx (talk | contribs) (→‎GCC)
Jump to navigation Jump to search

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)


  • compyx (x64, Linux/Ubuntu 18.10, GCC 8.2.0, SDL2) (r35666)
 $ ../vice/configure --program-suffix=-sdl2 --enable-sdlui2 --with-sdlsound --with-alsa --with-pulse --with-png --with-jpeg --with-gif --enable-ethernet --enable-realdevice --enable-debug
Making all in arch
Making all in sdl
In file included from ../../../../vice/src/arch/sdl/console.c:36:
../../../../vice/src/arch/sdl/console_unix.c: In function ‘readline’:
../../../../vice/src/arch/sdl/console_unix.c:108:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
     fgets(p, 1024, mon_input);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../vice/src/arch/sdl/console_unix.c: In function ‘readline’:
../../../../vice/src/arch/sdl/console_unix.c:108:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
     fgets(p, 1024, mon_input);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
Making all in shared
Making all in lib
Making all in p64
Making all in hvsc
../../vice/src/machine-bus.c: In function ‘machine_bus_init’:
../../vice/src/machine-bus.c:61:19: warning: cast between incompatible function types from ‘int (*)(void)’ to ‘int (*)(struct vdrive_s *, uint8_t *, unsigned int)’ {aka ‘int (*)(struct vdrive_s *, unsigned char *, unsigned int)’} [-Wcast-function-type]
         p->getf = (int (*)(struct vdrive_s *, uint8_t *, unsigned int))fn;
                   ^
../../vice/src/machine-bus.c:62:19: warning: cast between incompatible function types from ‘int (*)(void)’ to ‘int (*)(struct vdrive_s *, uint8_t,  unsigned int)’ {aka ‘int (*)(struct vdrive_s *, unsigned char,  unsigned int)’} [-Wcast-function-type]
         p->putf = (int (*)(struct vdrive_s *, uint8_t, unsigned int))fn;
                   ^
../../vice/src/machine-bus.c:63:20: warning: cast between incompatible function types from ‘int (*)(void)’ to ‘int (*)(struct vdrive_s *, const uint8_t *, unsigned int,  unsigned int,  struct cbmdos_cmd_parse_s *)’ {aka ‘int (*)(struct vdrive_s *, const unsigned char *, unsigned int,  unsigned int,  struct cbmdos_cmd_parse_s *)’} [-Wcast-function-type]
         p->openf = (int (*)(struct vdrive_s *, const uint8_t *, unsigned int,
                    ^
../../vice/src/machine-bus.c:65:21: warning: cast between incompatible function types from ‘int (*)(void)’ to ‘int (*)(struct vdrive_s *, unsigned int)’ [-Wcast-function-type]
         p->closef = (int (*)(struct vdrive_s *, unsigned int))fn;
                     ^
../../vice/src/machine-bus.c: In function ‘machine_bus_device_detach’:
../../vice/src/machine-bus.c:140:19: warning: cast between incompatible function types from ‘int (*)(void)’ to ‘int (*)(struct vdrive_s *, uint8_t *, unsigned int)’ {aka ‘int (*)(struct vdrive_s *, unsigned char *, unsigned int)’} [-Wcast-function-type]
         p->getf = (int (*)(struct vdrive_s *, uint8_t *, unsigned int))fn;
                   ^
../../vice/src/machine-bus.c:141:19: warning: cast between incompatible function types from ‘int (*)(void)’ to ‘int (*)(struct vdrive_s *, uint8_t,  unsigned int)’ {aka ‘int (*)(struct vdrive_s *, unsigned char,  unsigned int)’} [-Wcast-function-type]
         p->putf = (int (*)(struct vdrive_s *, uint8_t, unsigned int))fn;
                   ^
../../vice/src/machine-bus.c:142:20: warning: cast between incompatible function types from ‘int (*)(void)’ to ‘int (*)(struct vdrive_s *, const uint8_t *, unsigned int,  unsigned int,  struct cbmdos_cmd_parse_s *)’ {aka ‘int (*)(struct vdrive_s *, const unsigned char *, unsigned int,  unsigned int,  struct cbmdos_cmd_parse_s *)’} [-Wcast-function-type]
         p->openf = (int (*)(struct vdrive_s *, const uint8_t *, unsigned int,
                    ^

clang

  • gpz (x86, Linux/Gentoo, 64bit, clang 5.0.1, GTK3) (3.2 tarball)
CC=clang CXX=clang LD=clang ./configure --enable-native-tools --enable-arch=native --prefix=/usr/games/ --enable-parsid --with-midas --with-resid --with-xaw3d --with-arts --with-x --enable-native-gtk3ui --enable-ethernet --with-pulse --with-sdlsound --enable-fullscreen --enable-cpuhistory --enable-static-ffmpeg

note: here compiling using clang breaks in either ffmpeg or resid

Making all in gfxoutputdrv
ffmpegdrv.c:126:36: warning: missing field 'next_pts' initializer [-Wmissing-field-initializers]
static OutputStream audio_st = { 0 };
                                   ^
ffmpegdrv.c:139:36: warning: missing field 'next_pts' initializer [-Wmissing-field-initializers]
static OutputStream video_st = { 0 };
                                   ^
ffmpegdrv.c:512:24: warning: missing field 'pts' initializer [-Wmissing-field-initializers]
    AVPacket pkt = { 0 };
                       ^
ffmpegdrv.c:981:28: warning: missing field 'pts' initializer [-Wmissing-field-initializers]
        AVPacket pkt = { 0 };
                           ^

Making all in base
keysetdialog.c:98:44: warning: suggest braces around initialization of subobject [-Wmissing-braces]
static GtkWidget *keyset_buttons[3][3] = { NULL };
                                           ^~~~
                                           {   }                                                                                                                                                     
/usr/lib64/llvm/5/bin/../../../../lib/clang/5.0.1/include/stddef.h:105:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
1 warning generated.
videopalettewidget.c:90:9: warning: unused variable 'index' [-Wunused-variable]
    int index = gtk_combo_box_get_active(combo);
        ^
1 warning generated.
ui.c:427:24: warning: unused variable 'tmp' [-Wunused-variable]
                gchar *tmp = g_filename_from_uri(files[i], NULL, NULL);
                       ^
1 warning generated.
uinetplay_new.c:88:9: warning: unused variable 'state' [-Wunused-variable]
    int state = gtk_switch_get_active(widget);
        ^

Making all in ffmpeg
In file included from info.c:34:
./infocontrib.h:293:8: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Andr<E9> Fachat <fachat@physik.tu-chemnitz.de>\n"
       ^~~~
./infocontrib.h:343:12: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Paul Dub<E9> \n"
           ^~~~
./infocontrib.h:444:8: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Istv<E1>n F<E1>bi<E1>n\n"
       ^~~~   ~~~~  ~~~~
./infocontrib.h:532:11: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Frank K<F6>nig <frank_koenig@t-online.de>\n"
          ^~~~
./infocontrib.h:571:11: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Marko M<E4>kel<E4> <msmakela@gmail.com>\n"
          ^~~~   ~~~~
./infocontrib.h:622:10: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Lasse <D6><F6>rni <loorni@mail.student.oulu.fi>\n"
         ^~~~~~~~
./infocontrib.h:655:14: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
"  Pablo Rold<E1>n <pdroldan@yahoo.com>\n"
             ^~~~
./infocontrib.h:799: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:841: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:841: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:862:29: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "2004-2017", "Paul Dub<E9>", "French", "Paul Dub<E9> " },
                            ^~~~
./infocontrib.h:862:52: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
    { "2004-2017", "Paul Dub<E9>", "French", "Paul Dub<E9> " },
                                                      ^~~~
12 warnings generated.
zfile.c:490:17: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
                !strcasecmp(tmp + l - len, search) != 0) {
                ^                                  ~~
zfile.c:490:17: note: add parentheses after the '!' to evaluate the comparison first
                !strcasecmp(tmp + l - len, search) != 0) {
                ^
                 (                                     )                                                                                                                                             
zfile.c:490:17: note: add parentheses around left hand side expression to silence this warning
                !strcasecmp(tmp + l - len, search) != 0) {
                ^
                (                                 )                                                                                                                                                  
1 warning generated.