Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct util_format_channel_description
- {
- unsigned type:5;
- unsigned normalized:1;
- unsigned pure_integer:1;
- unsigned size:9;
- };
- static boolean
- is_legal_int_format_combo(
- const struct util_format_description *src,
- const struct util_format_description *dst )
- {
- ....
- for (i = 0; i < nr; i++) {
- /* The signs must match. */
- if (src->channel[i].type != src->channel[i].type) {
- return FALSE;
- }
- ....
- }
- This is what should have been written here: src->channel[i].type != dst->channel[i].type
- This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions 'src->channel[i].type' to the left and to the right of the '!=' operator. translate_generic.c 776
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment