History

Trivial changes to avoid some compiler warnings.

Edmund Grimley Evans committed 10 years ago

Commit ba99a701 parent 553242c5 files · +12 −9Browse files

Unified · Split

5 files
  1. libtcc.c +1 −1
  2. tcc.h +4 −4
  3. tccasm.c +4 −1
  4. tccrun.c +1 −1
  5. x86_64-gen.c +2 −2
libtcc.c+1−1
@@ -1974,7 +1974,7 @@ enum { · 1973 unmodified lines
1974 TCC_OPTION_E,1974 TCC_OPTION_E,
1975 TCC_OPTION_MD,1975 TCC_OPTION_MD,
1976 TCC_OPTION_MF,1976 TCC_OPTION_MF,
1977 TCC_OPTION_x,1977 TCC_OPTION_x
1978};1978};
1979 1979
1980#define TCC_OPTION_HAS_ARG 0x00011980#define TCC_OPTION_HAS_ARG 0x0001
tcc.h+4−4
@@ -34,7 +34,7 @@ · 33 unmodified lines
34#include <fcntl.h>34#include <fcntl.h>
35#include <setjmp.h>35#include <setjmp.h>
36#include <time.h>36#include <time.h>
37#include <sys/stat.h> // stat()37#include <sys/stat.h> /* stat() */
38 38
39#ifdef CONFIG_TCCASSERT39#ifdef CONFIG_TCCASSERT
40#include <assert.h>40#include <assert.h>
@@ -704,7 +704,7 @@ struct TCCState { · 663 unmodified lines
704 enum {704 enum {
705 LINE_MACRO_OUTPUT_FORMAT_GCC,705 LINE_MACRO_OUTPUT_FORMAT_GCC,
706 LINE_MACRO_OUTPUT_FORMAT_NONE,706 LINE_MACRO_OUTPUT_FORMAT_NONE,
707 LINE_MACRO_OUTPUT_FORMAT_STD,707 LINE_MACRO_OUTPUT_FORMAT_STD
708 } Pflag; /* -P switch */708 } Pflag; /* -P switch */
709 int dflag; /* -dX value */709 int dflag; /* -dX value */
710 710
@@ -1033,8 +1033,8 @@ struct TCCState { · 322 unmodified lines
1033#endif /* defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 */1033#endif /* defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 */
1034 1034
1035enum tcc_token {1035enum tcc_token {
1036 TOK_LAST = TOK_IDENT - 1,1036 TOK_LAST = TOK_IDENT - 1
1037#define DEF(id, str) id,1037#define DEF(id, str) ,id
1038#include "tcctok.h"1038#include "tcctok.h"
1039#undef DEF1039#undef DEF
1040};1040};
tccasm.c+4−1
@@ -550,7 +550,10 @@ static void asm_parse_directive(TCCState *s1) · 549 unmodified lines
550 n = asm_int_expr(s1);550 n = asm_int_expr(s1);
551 next();551 next();
552 }552 }
553 sprintf(sname, (n?".%s%d":".%s"), get_tok_str(tok1, NULL), n);553 if (n)
554 sprintf(sname, ".%s%d", get_tok_str(tok1, NULL), n);
555 else
556 sprintf(sname, ".%s", get_tok_str(tok1, NULL));
554 use_section(s1, sname);557 use_section(s1, sname);
555 }558 }
556 break;559 break;
tccrun.c+1−1
@@ -235,7 +235,7 @@ static void set_pages_executable(void *ptr, unsigned long length) · 234 unmodified lines
235 end = (addr_t)ptr + length;235 end = (addr_t)ptr + length;
236 end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);236 end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);
237 mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);237 mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);
238 __clear_cache(ptr, ptr + length);238 __clear_cache(ptr, (char *)ptr + length);
239#endif239#endif
240}240}
241 241
x86_64-gen.c+2−2
@@ -77,7 +77,7 @@ enum { · 76 unmodified lines
77 77
78 TREG_ST0 = 24,78 TREG_ST0 = 24,
79 79
80 TREG_MEM = 0x20,80 TREG_MEM = 0x20
81};81};
82 82
83#define REX_BASE(reg) (((reg) >> 3) & 1)83#define REX_BASE(reg) (((reg) >> 3) & 1)
@@ -1703,7 +1703,7 @@ int gtst(int inv, int t) · 1619 unmodified lines
1703 to our target if the result was unordered and test wasn't NE,1703 to our target if the result was unordered and test wasn't NE,
1704 otherwise if unordered we don't want to jump. */1704 otherwise if unordered we don't want to jump. */
1705 vtop->c.i &= ~0x100;1705 vtop->c.i &= ~0x100;
1706 if (!inv == (vtop->c.i != TOK_NE))1706 if (inv == (vtop->c.i == TOK_NE))
1707 o(0x067a); /* jp +6 */1707 o(0x067a); /* jp +6 */
1708 else1708 else
1709 {1709 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t