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
542542 tcc_exit_state();
543543
544544 if (mode == ERROR_WARN) {
545− if (s1->warn_none)
545+ if (s1->warn_mask & WARN_DISABLED)
546546 return;
547− if (s1->warn_mask & (WARN_ERROR << WARN_ERROR_SHIFT))
547+ if (s1->warn_mask & WARN_ERROR_MASK) /* XXX individual ignorance */
548548 mode = ERROR_ERROR;
549549 }
550550
@@ -1976,12 +1976,12 @@ reparse: · 1425 unmodified lines
19761976 }
19771977 break;
19781978 case TCC_OPTION_W:
1979− s->warn_none = 0;
1979+ s->warn_mask &= ~WARN_DISABLED;
19801980 if (optarg[0] && set_W_flag(s, optarg) < 0)
19811981 goto unsupported_option;
19821982 break;
19831983 case TCC_OPTION_w:
1984− s->warn_none = 1;
1984+ s->warn_mask |= WARN_DISABLED;
19851985 break;
19861986 case TCC_OPTION_rdynamic:
19871987 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