Warnings

From vice-emu
Jump to: navigation, search

Contents

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, Windows 10/msys2, GCC 7.3.0, SDL2) (r35061)
In file included from ../../../../vice/src/arch/sdl/archdep.c:54:0:
../../../../vice/src/arch/sdl/archdep_win32.c: In function 'kbd_arch_get_host_mapping':
../../../../vice/src/arch/sdl/archdep_win32.c:781:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     int lang = (int)GetKeyboardLayout(0);
                ^
At top level:
../../../../vice/src/arch/sdl/archdep_win32.c:224:13: warning: 'system_wcstombs_free' defined but not used [-Wunused-function]
 static void system_wcstombs_free(char *mbs)
             ^22:48, 18 June 2018 (CEST)22:48, 18 June 2018 (CEST)22:48, 18 June 2018 (CEST)[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 22:48, 18 June 2018 (CEST)
../../../../vice/src/arch/sdl/archdep_win32.c:210:14: warning: 'system_wcstombs_alloc' defined but not used [-Wunused-function]
 static char *system_wcstombs_alloc(const char *wcs)
              ^22:48, 18 June 2018 (CEST)22:48, 18 June 2018 (CEST)22:48, 18 June 2018 (CEST)22:48, 18 June 2018 (CEST)
../../../../vice/src/arch/sdl/menu_c64cart.c: In function 'makegroup':
../../../../vice/src/arch/sdl/menu_c64cart.c:87:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             ui_c64cart_entry.data = (ui_callback_data_t)(unsigned long)cartlist->crtid;
                                     ^
In file included from ../../../../vice/src/arch/sdl/menu_midi.c:35:0:
../../../../vice/src/arch/sdl/menu_midi.c:161:18: warning: no previous prototype for 'MIDIInDev_dynmenu_callback' [-Wmissing-prototypes]
 UI_MENU_CALLBACK(MIDIInDev_dynmenu_callback)
                  ^
../../../../vice/src/arch/sdl/menu_common.h:62:17: note: in definition of macro 'UI_MENU_CALLBACK'
     const char *name(int activated, ui_callback_data_t param)
                 ^[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]])
../../../../vice/src/arch/sdl/menu_midi.c: In function 'MIDIInDev_dynmenu_callback':
../../../../vice/src/arch/sdl/menu_midi.c:189:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                 midi_in_dyn_menu[i].data = (ui_callback_data_t)j;
                                            ^
In file included from ../../../../vice/src/arch/sdl/menu_midi.c:35:0:
../../../../vice/src/arch/sdl/menu_midi.c: At top level:
../../../../vice/src/arch/sdl/menu_midi.c:203:18: warning: no previous prototype for 'MIDIOutDev_dynmenu_callback' [-Wmissing-prototypes]
 UI_MENU_CALLBACK(MIDIOutDev_dynmenu_callback)
                  ^
../../../../vice/src/arch/sdl/menu_common.h:62:17: note: in definition of macro 'UI_MENU_CALLBACK'
     const char *name(int activated, ui_callback_data_t param)
                 ^[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]])
../../../../vice/src/arch/sdl/menu_midi.c: In function 'MIDIOutDev_dynmenu_callback':
../../../../vice/src/arch/sdl/menu_midi.c:231:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                 midi_out_dyn_menu[i].data = (ui_callback_data_t)j;
                                             ^
../../../../vice/src/arch/sdl/menu_settings.c: In function 'uikeyboard_menu_create':
../../../../vice/src/arch/sdl/menu_settings.c:179:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         ui_keyboard_mapping_entry.data = (ui_callback_data_t)(unsigned long)kbdlist->mapping;
                                         ^

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.