dominus

Untitled

Apr 8th, 2026
7,228
0
Never
102
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. ** CID 1670535: Incorrect expression (IDENTICAL_BRANCHES)
  2. /gumps/Dynamic_slider.cc: 509 in Dynamic_slider::mouse_drag(int, int)()
  3.  
  4.  
  5. _____________________________________________________________________________________________
  6. *** CID 1670535: Incorrect expression (IDENTICAL_BRANCHES)
  7. /gumps/Dynamic_slider.cc: 509 in Dynamic_slider::mouse_drag(int, int)()
  8. 503 }
  9. 504
  10. 505 int newval = val_from_thumb();
  11. 506 if (newval != val) {
  12. 507 val = newval;
  13. 508 gwin->add_dirty(get_rect());
  14. >>> CID 1670535: Incorrect expression (IDENTICAL_BRANCHES)
  15. >>> The same code is executed when the condition "this->call_usecode_callback()" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed?
  16. 509 if (call_usecode_callback()) {
  17. 510 return true; // `this` may be destroyed.
  18. 511 }
  19. 512 return true;
  20. 513 }
  21. 514
  22.  
  23. ** CID 1670534: Memory - corruptions (REVERSE_NEGATIVE)
  24. /mapedit/combo.cc: 1601 in Combo_chooser::search(const char *, int)()
  25.  
  26.  
  27. _____________________________________________________________________________________________
  28. *** CID 1670534: Memory - corruptions (REVERSE_NEGATIVE)
  29. /mapedit/combo.cc: 1601 in Combo_chooser::search(const char *, int)()
  30. 1595 scroll_row_vertical(row0 - 1);
  31. 1596 }
  32. 1597 while (row0 < rows.size() - 1 && i >= static_cast<int>(rows[row0 + 1].index0)) { // Below?
  33. 1598 scroll_row_vertical(row0 + 1);
  34. 1599 }
  35. 1600 const int newsel = i; // New selection.
  36. >>> CID 1670534: Memory - corruptions (REVERSE_NEGATIVE)
  37. >>> You might be using variable "newsel" before verifying that it is >= 0.
  38. 1601 if (newsel >= 0 && newsel < static_cast<int>(info.size())) {
  39. 1602 select(newsel);
  40. 1603 }
  41. 1604 render();
Advertisement