Merge Request #12

Merged
jerasure/gf-complete!12
Created by Danny Al-Gaaf

Fix issues found by Coverity in the Ceph project

Remove dead code and fix potential integer overflow issues

Assignee: None
Milestone: None

Merged by Loic Dachary

Commits (6)
  • Fix for Coverity issue (from Ceph):
    
    CID 1193089 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
     overflow_before_widen: Potentially overflowing expression 1 << g_r with type
     int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
     a context that expects an expression of type uint64_t (64 bits, unsigned).
    
    CID 1193090 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
     overflow_before_widen: Potentially overflowing expression 1 << g_s with type
     int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
     a context that expects an expression of type uint64_t (64 bits, unsigned).
    
    Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
    Danny Al-Gaaf
     
  • Fix for Coverity issue (from Ceph):
    
    CID 1193088 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
     overflow_before_widen: Potentially overflowing expression 1 << g_s with type
     int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
     a context that expects an expression of type uint64_t (64 bits, unsigned).
    
    Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
    Danny Al-Gaaf
     
  • Fix for Coverity issue (from Ceph):
    
    CID 1193087 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
     overflow_before_widen: Potentially overflowing expression 1 << g_r with type
      int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used
      in a context that expects an expression of type uint64_t (64 bits, unsigned).
    
    Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
    Danny Al-Gaaf
     
  • Fix for Coverity issue (from Ceph):
    
    CID 1193086 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
     overflow_before_widen: Potentially overflowing expression 1 << g_r with type
      int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
      a context that expects an expression of type uint64_t (64 bits, unsigned).
    
    Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
    Danny Al-Gaaf
     
  • Fix for Coverity issue:
    
    CID 1297812 (#1 of 1): Constant variable guards dead code (DEADCODE)
     dead_error_begin: Execution cannot reach this statement: fprintf(stderr,
      "Code conta....
     Local variable no_default_flag is assigned only once, to a constant
      value, making it effectively constant throughout its scope. If this
      is not the intent, examine the logic to see if there is a missing
      assignment that would make no_default_flag not remain constant.
    
    Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
    Danny Al-Gaaf
     
  • Fix for Coverity issue:
    
    CID 1297852 (#1 of 1): 'Constant'; variable guards dead code (DEADCODE)
     dead_error_begin: Execution cannot reach this statement:
      fprintf(stderr, "Code conta....
     Local variable no_default_flag is assigned only once, to a constant value,
      making it effectively constant throughout its scope. If this is not the
      intent, examine the logic to see if there is a missing assignment that
      would make no_default_flag not remain constant.
    
    Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
    Danny Al-Gaaf
     
2 participants