Skip to content

Commit dc6a740

Browse files
manxiaoliangsysopenci
authored andcommitted
Fixed coverity issues
*Dead default in switch *Rule of three *Unintentional integer overflow *Uninitialized scalar field Tracked-On: OAM-131874 Signed-off-by: manxiaoliang <xiaoliangx.man@intel.com>
1 parent 0dd0b46 commit dc6a740

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

drm/DrmFbImporter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class DrmFbIdHandle {
5959
std::array<GemHandle, kBufferMaxPlanes> gem_handles_{};
6060
std::array<GemHandle, kBufferMaxPlanes> shadow_handles_{};
6161
std::array<int, kBufferMaxPlanes> shadow_fds_{};
62-
bool use_shadow_buffers_;
62+
bool use_shadow_buffers_ = false;
6363
std::shared_ptr<IntelBlitter> blitter_;
6464
};
6565

utils/intel_blit.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,6 @@ int intel_create_buffer(struct intel_info *info, uint32_t width, uint32_t height
666666
break;
667667
}
668668
switch (tiling) {
669-
default:
670669
case I915_TILING_NONE:
671670
/*
672671
* The Intel GPU doesn't need any alignment in linear mode,

utils/intel_blit.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct intel_info {
3535
uint32_t blitter_src;
3636
uint32_t blitter_dst;
3737
} mocs;
38-
int addr_offset;
38+
uint64_t addr_offset;
3939
uint32_t context_id;
4040
};
4141

@@ -55,6 +55,8 @@ class IntelBlitter {
5555
IntelBlitter() {
5656
intel_blit_init(&info);
5757
}
58+
IntelBlitter(const IntelBlitter &) = delete;
59+
IntelBlitter &operator=(const IntelBlitter &) = delete;
5860
~IntelBlitter() {
5961
intel_blit_destroy(&info);
6062
}

0 commit comments

Comments
 (0)