[Bug 1439893] Review Request: luadec - Lua Decompiler for lua 5.1, 5.2, and 5.3 (built for 5.1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1439893



--- Comment #3 from Ye Cheng <18969068329@xxxxxxx> ---
(In reply to Ye Cheng from comment #1)
There are also some compiler warnings in build.log
+ cd ../luadec
gcc -O2 -Wall -DSRCVERSION=\"UNKNOWN\" -I../lua-5.1/src    -c -o guess.o
guess.c
guess.c: In function 'luaU_guess_locals':
guess.c:152:3: warning: enumeration value 'OP_LOADK' not handled in switch
[-Wswitch]
   switch (o) {
   ^~~~~~
guess.c:152:3: warning: enumeration value 'OP_LOADBOOL' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_LOADNIL' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_GETUPVAL' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_GETGLOBAL' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_NEWTABLE' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_CONCAT' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_JMP' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_TEST' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_CALL' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_TAILCALL' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_FORLOOP' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_FORPREP' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_TFORLOOP' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_SETLIST' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_CLOSE' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_CLOSURE' not handled in switch
[-Wswitch]
guess.c:152:3: warning: enumeration value 'OP_VARARG' not handled in switch
[-Wswitch]
guess.c:216:7: warning: unused variable 'bc' [-Wunused-variable]
   int bc = GETARG_Bx(instr);
       ^~
guess.c:574:25: warning: '%d' directive writing between 1 and 10 bytes into a
region of size between 0 and 6 [-Wformat-overflow=]
     sprintf(names,"l_%d_%d",main,i);
                         ^~
guess.c:574:19: note: directive argument in the range [0, 2147483647]
     sprintf(names,"l_%d_%d",main,i);
                   ^~~~~~~~~
guess.c:574:5: note: 'sprintf' output between 6 and 25 bytes into a destination
of size 10
     sprintf(names,"l_%d_%d",main,i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
disassemble.c: In function 'luadec_disassemble':
disassemble.c:80:16: warning: zero-length gnu_printf format string
[-Wformat-zero-length]
   sprintf(line,"");
                ^~
disassemble.c:321:17: warning: zero-length gnu_printf format string
[-Wformat-zero-length]
     sprintf(tmp,"");
                 ^~
disassemble.c:331:18: warning: zero-length gnu_printf format string
[-Wformat-zero-length]
     sprintf(tmp2,"");
                  ^~
disassemble.c:345:18: warning: zero-length gnu_printf format string
[-Wformat-zero-length]
     sprintf(tmp, "");
                  ^~
disassemble.c:391:8: warning: unused variable 'next_is_extraarg'
[-Wunused-variable]
    int next_is_extraarg = 1;
        ^~~~~~~~~~~~~~~~
statement.c: In function 'PrintBreakStatement':
statement.c:118:32: warning: too many arguments for format
[-Wformat-extra-args]
   StringBuffer_addPrintf(buff, "do break end\n", stmt->code);
                                ^~~~~~~~~~~~~~~~
statement.c:121:32: warning: too many arguments for format
[-Wformat-extra-args]
   StringBuffer_addPrintf(buff, "break\n", stmt->code);
                                ^~~~~~~~~
luareplace.c: In function 'checkProto':
luareplace.c:178:16: warning: variable 'stop' set but not used
[-Wunused-but-set-variable]
  int diff = 0, stop = 0;
                ^~~~
decompile.c:458:15: warning: variable 'savecurr' set but not used
[-Wunused-but-set-variable]
     LogicExp* savecurr;
               ^~~~~~~~
decompile.c: In function 'RawAddAstStatement':
decompile.c:606:8: warning: unused variable 'blockSize' [-Wunused-variable]
    int blockSize = block->sub->size;
        ^~~~~~~~~
decompile.c:591:17: warning: unused variable 'tail' [-Wunused-variable]
   AstStatement* tail = cast(AstStatement*, block->sub->tail);
                 ^~~~
decompile.c: In function 'FlushBoolean':
decompile.c:666:8: warning: unused variable 'whileStart' [-Wunused-variable]
    int whileStart = walk->start;
        ^~~~~~~~~~
decompile.c: In function 'DeclareLocals':
decompile.c:1220:6: warning: variable 'loopconvert' set but not used
[-Wunused-but-set-variable]
  int loopconvert;
      ^~~~~~~~~~~
decompile.c: In function 'MakeIndex':
decompile.c:1432:4: warning: enumeration value 'SQUARE_BRACKET' not handled in
switch [-Wswitch]
    switch (type) {
    ^~~~~~
decompile.c: In function 'PrintLoopTree':
decompile.c:1702:25: warning: format '%x' expects argument of type 'unsigned
int', but argument 4 has type 'LoopItem * {aka struct LoopItem_ *}' [-Wformat=]
  fprintf(stderr, "%s=0x%x prep=%d start=%d body=%d end=%d out=%d block=0x%x
\n"
                        ~^
decompile.c:1702:75: warning: format '%x' expects argument of type 'unsigned
int', but argument 10 has type 'AstStatement * {aka struct AstStatement_ *}'
[-Wformat=]
  fprintf(stderr, "%s=0x%x prep=%d start=%d body=%d end=%d out=%d block=0x%x
\n"
                                                                          ~^
   ,stmttype[li->type], li, li->prep, li->start, li->body, li->end, li->out,
li->block);
                                                                            
~~~~~~~~~
decompile.c: In function 'ProcessCode':
decompile.c:1836:7: warning: unused variable 'func_check_result'
[-Wunused-variable]
   int func_check_result = FunctionCheck(f, funcnumstr, str);
       ^~~~~~~~~~~~~~~~~
decompile.c:2211:23: warning: unused variable 'endif' [-Wunused-variable]
     int thenaddr = 0, endif = 0;
                       ^~~~~
decompile.c:2532:39: warning: variable 'state' set but not used
[-Wunused-but-set-variable]
     const char *generator, *control, *state;
                                       ^~~~~
decompile.c:2532:29: warning: variable 'control' set but not used
[-Wunused-but-set-variable]
     const char *generator, *control, *state;
                             ^~~~~~~
decompile.c:2614:23: warning: unused variable 'endif' [-Wunused-variable]
     int thenaddr = 0, endif = 0;
                       ^~~~~
decompile.c:2755:19: warning: unused variable 'parentStmt' [-Wunused-variable]
     AstStatement* parentStmt = NULL;
                   ^~~~~~~~~~
decompile.c:2941:9: warning: variable 'stepLen' set but not used
[-Wunused-but-set-variable]
     int stepLen;
         ^~~~~~~
decompile.c:2940:35: warning: variable 'endstr' set but not used
[-Wunused-but-set-variable]
     const char *initial, *a1str, *endstr;
                                   ^~~~~~
decompile.c:3049:8: warning: unused variable 'cfnum' [-Wunused-variable]
    int cfnum = functionnum;
        ^~~~~
decompile.c:1792:6: warning: unused variable 'baseIndent' [-Wunused-variable]
  int baseIndent = indent;
      ^~~~~~~~~~
decompile.c: In function 'MakeIndex':
decompile.c:1420:6: warning: 'ret' may be used uninitialized in this function
[-Wmaybe-uninitialized]
  int ret;
      ^~~

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux