Project

General

Profile

Bug #12113

Updated by Toomas Soome over 1 year ago

Build errors with gcc 8: 
 <pre> 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:104:8: note: in expansion of macro 'C' 
       "?",    C help,    M|NOLIST, 0, 0, 
             ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:107:11: note: in expansion of macro 'C' 
       "help",    C help,    M|NOLIST, 0, 0, 
                ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:108:8: note: in expansion of macro 'C' 
       "=",    C pdot,    NOLIST,    0, 0, 
             ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(int)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:117:11: note: in expansion of macro 'C' 
       "quit",    C edstop, NOLIST,    0, 0, 
                ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:118:11: note: in expansion of macro 'C' 
       "list",    C pcmdlist, M|NOLIST, 0, 0, 
                ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(int)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:120:10: note: in expansion of macro 'C' 
       "xit",    C rexit, M|NOLIST, 0, 0, 
               ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(int)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:121:11: note: in expansion of macro 'C' 
       "exit",    C rexit, M|NOLIST, 0, 0, 
                ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:125:11: note: in expansion of macro 'C' 
       "else",    C elsecmd, F|M|RAWLIST, 0, 0, 
                ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:126:11: note: in expansion of macro 'C' 
       "endif", C endifcmd, F|M|RAWLIST, 0, 0, 
                ^ 
     cmdtab.c:54:11: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *)' [-Werror=cast-function-type] 
      #define C (int (*)(void *)) 
                ^ 
     cmdtab.c:138:10: note: in expansion of macro 'C' 
       "inc",    C inc,    T|NOLIST, 0, 0, 
               ^ 
    
     lex.c:521:21: error: cast between incompatible function types from 'int (*)(int)' to 'int (*)(void *)' [-Werror=cast-function-type] 
       if (com->c_func == (int (*)(void *))edstop) { 
                          ^ 
     lex.c:671:21: error: cast between incompatible function types from 'int (*)(int)' to 'int (*)(void *)' [-Werror=cast-function-type] 
       if (com->c_func == (int (*)(void *))edstop) 
                          ^ 
    
     cc1: all warnings being treated as errors 
 </pre> 

 Testing done: build/install/boot

Back