History

-W[no-]error: rid of TCCState.warn_none, too; and adjust -h/-hh output

Steffen Nurpmeso committed 5 years ago

Commit 49cd6f51 parent 0d59ac43 files · +19 −14Browse files

Showing the changes to libtcc.c (1 of 3 files). Show all

Unified · Split

libtcc.c+4−4
@@ -542,9 +542,9 @@ static void error1(int mode, const char *fmt, va_list ap) · 541 unmodified lines
542 tcc_exit_state();542 tcc_exit_state();
543 543
544 if (mode == ERROR_WARN) {544 if (mode == ERROR_WARN) {
545 if (s1->warn_none)545 if (s1->warn_mask & WARN_DISABLED)
546 return;546 return;
547 if (s1->warn_mask & (WARN_ERROR << WARN_ERROR_SHIFT))547 if (s1->warn_mask & WARN_ERROR_MASK) /* XXX individual ignorance */
548 mode = ERROR_ERROR;548 mode = ERROR_ERROR;
549 }549 }
550 550
@@ -1976,12 +1976,12 @@ reparse: · 1425 unmodified lines
1976 }1976 }
1977 break;1977 break;
1978 case TCC_OPTION_W:1978 case TCC_OPTION_W:
1979 s->warn_none = 0;1979 s->warn_mask &= ~WARN_DISABLED;
1980 if (optarg[0] && set_W_flag(s, optarg) < 0)1980 if (optarg[0] && set_W_flag(s, optarg) < 0)
1981 goto unsupported_option;1981 goto unsupported_option;
1982 break;1982 break;
1983 case TCC_OPTION_w:1983 case TCC_OPTION_w:
1984 s->warn_none = 1;1984 s->warn_mask |= WARN_DISABLED;
1985 break;1985 break;
1986 case TCC_OPTION_rdynamic:1986 case TCC_OPTION_rdynamic:
1987 s->rdynamic = 1;1987 s->rdynamic = 1;

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