mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +00:00
parser: Fix warnings in chfa.cc
chfa.cc:348:4: warning: this statement may fall through [-Wimplicit-fallthrough=] os.put((char)(*pos >> 16)); ^~ chfa.cc:349:3: note: here case 2: ^~~~ chfa.cc:350:4: warning: this statement may fall through [-Wimplicit-fallthrough=] os.put((char)(*pos >> 8)); ^~ chfa.cc:351:3: note: here case 1: ^~~~ chfa.cc: In function ‘void write_flex_table(std::ostream&, int, Iter, Iter) [with Iter = __gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int> >]’: chfa.cc:348:4: warning: this statement may fall through [-Wimplicit-fallthrough=] os.put((char)(*pos >> 16)); ^~ chfa.cc:349:3: note: here case 2: ^~~~ chfa.cc:350:4: warning: this statement may fall through [-Wimplicit-fallthrough=] os.put((char)(*pos >> 8)); ^~ chfa.cc:351:3: note: here case 1: ^~~~ chfa.cc: In function ‘void write_flex_table(std::ostream&, int, Iter, Iter) [with Iter = __gnu_cxx::__normal_iterator<short unsigned int*, std::vector<short unsigned int> >]’: chfa.cc:348:4: warning: this statement may fall through [-Wimplicit-fallthrough=] os.put((char)(*pos >> 16)); ^~ chfa.cc:349:3: note: here case 2: ^~~~ chfa.cc:350:4: warning: this statement may fall through [-Wimplicit-fallthrough=] os.put((char)(*pos >> 8)); ^~ chfa.cc:351:3: note: here case 1: ^~~~ MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/561 Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
@@ -346,10 +346,13 @@ template<class Iter>
|
||||
case 4:
|
||||
os.put((char)(*pos >> 24));
|
||||
os.put((char)(*pos >> 16));
|
||||
/* Fall through */
|
||||
case 2:
|
||||
os.put((char)(*pos >> 8));
|
||||
/* Fall through */
|
||||
case 1:
|
||||
os.put((char)*pos);
|
||||
/* Fall through */
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user