e41ae676c253760621e81bc9745e8ecf8175f085 |
|
31-May-2017 |
Stephen Smalley <sds@tycho.nsa.gov> |
libsepol,libsemanage,libselinux: Fix fallthrough warnings from gcc 7 https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ Fixes the following warnings by annotating with a /* FALLTHRU */ comment. Unfortunately, the __attribute__ ((fallthrough)); approach does not appear to work with older compilers. ../cil/src/cil_parser.c: In function ‘cil_parser’: ../cil/src/cil_parser.c:253:14: warning: this statement may fall through [-Wimplicit-fallthrough=] tok.value = tok.value+1; ~~~~~~~~~~^~~~~~~~~~~~~ ../cil/src/cil_parser.c:254:3: note: here case SYMBOL: ^~~~ ../cil/src/cil_parser.c:275:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (tok.type != END_OF_FILE) { ^ ../cil/src/cil_parser.c:279:3: note: here case END_OF_FILE: ^~~~ ../cil/src/cil_post.c: In function ‘cil_post_fc_fill_data’: ../cil/src/cil_post.c:104:5: warning: this statement may fall through [-Wimplicit-fallthrough=] c++; ~^~ ../cil/src/cil_post.c:105:3: note: here default: ^~~~~~~ regex.c: In function ‘regex_format_error’: regex.c:541:10: warning: this statement may fall through [-Wimplicit-fallthrough=] *ptr++ = '.'; ~~~~~~~^~~~~ regex.c:542:2: note: here case 3: ^~~~ regex.c:543:10: warning: this statement may fall through [-Wimplicit-fallthrough=] *ptr++ = '.'; ~~~~~~~^~~~~ regex.c:544:2: note: here case 2: ^~~~ regex.c:545:10: warning: this statement may fall through [-Wimplicit-fallthrough=] *ptr++ = '.'; ~~~~~~~^~~~~ regex.c:546:2: note: here case 1: ^~~~ regex.c: In function ‘regex_format_error’: regex.c:541:10: warning: this statement may fall through [-Wimplicit-fallthrough=] *ptr++ = '.'; ~~~~~~~^~~~~ regex.c:542:2: note: here case 3: ^~~~ regex.c:543:10: warning: this statement may fall through [-Wimplicit-fallthrough=] *ptr++ = '.'; ~~~~~~~^~~~~ regex.c:544:2: note: here case 2: ^~~~ regex.c:545:10: warning: this statement may fall through [-Wimplicit-fallthrough=] *ptr++ = '.'; ~~~~~~~^~~~~ regex.c:546:2: note: here case 1: ^~~~ modules.c: In function ‘semanage_module_get_path’: modules.c:602:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (file == NULL) file = "hll"; ^ modules.c:603:3: note: here case SEMANAGE_MODULE_PATH_CIL: ^~~~ modules.c:604:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (file == NULL) file = "cil"; ^ modules.c:605:3: note: here case SEMANAGE_MODULE_PATH_LANG_EXT: ^~~~ Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/external/selinux/libsepol/cil/src/cil_parser.c
|
67560cc7ace8c2ba728735e839729ac97e8a51a6 |
|
05-May-2016 |
James Carter <jwcart2@tycho.nsa.gov> |
libsepol/cil: Remove path field from cil_tree_node struct Remove path field from cil_tree_node struct and all references to it in CIL. This will reduce memory usage by 5%. Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
/external/selinux/libsepol/cil/src/cil_parser.c
|
681341f2f4172efc06a49bdda9c5ff03b055421e |
|
05-May-2016 |
James Carter <jwcart2@tycho.nsa.gov> |
libsepol/cil: Store CIL filename in parse tree and AST Use some of the functionality recently added to support high-level language line marking to track the CIL filename. The goal is to eventually remove the path field from the tree node struct and offset the addtion of the hll_line field. Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
/external/selinux/libsepol/cil/src/cil_parser.c
|
875a6bcbe8885c927122c6931b3a01d821e04b10 |
|
05-May-2016 |
James Carter <jwcart2@tycho.nsa.gov> |
libsepol/cil: Add high-level language line marking support Adds support for tracking original file and line numbers for better error reporting when a high-level language is translated into CIL. This adds a field called "hll_line" to struct cil_tree_node which increases memory usage by 5%. Syntax: ;;* lm(s|x) LINENO FILENAME (CIL STATEMENTS) ;;* lme lms is used when each of the following CIL statements corresponds to a line in the original file. lmx is used when the following CIL statements are all expanded from a single high-level language line. lme ends a line mark block. Example: ;;* lms 1 foo.hll (CIL-1) (CIL-2) ;;* lme ;;* lmx 10 bar.hll (CIL-3) (CIL-4) ;;* lms 100 baz.hll (CIL-5) (CIL-6) ;;* lme (CIL-7) ;;* lme CIL-1 is from line 1 of foo.hll CIL-2 is from line 2 of foo.hll CIL-3 is from line 10 of bar.hll CIL-4 is from line 10 of bar.hll CIL-5 is from line 100 of baz.hll CIL-6 is from line 101 of baz.hll CIL-7 is from line 10 of bar.hll Based on work originally done by Yuli Khodorkovskiy of Tresys. Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
/external/selinux/libsepol/cil/src/cil_parser.c
|
28ae74e112a031e1aeb22a2083568a881491b6db |
|
18-Feb-2015 |
Steve Lawrence <slawrence@tresys.com> |
Merge commit '76ba6eaa7333483a8cc0c73a7880f7acf99c2656'
|
bb0f8beff890195cfd459c67230c6130c86b3214 |
|
26-Aug-2014 |
Steve Lawrence <slawrence@tresys.com> |
Merge commit 'b19eafb97feb6389d78e1693f276fc5b10e25bd6' as 'libsepol/cil'
|