projects
/
platform
/
core
/
uifw
/
libds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30d6979
)
allocator/shm: Cast int to size_t to avoid warning
53/280253/1
author
Seunghun Lee
<shiin.lee@samsung.com>
Thu, 25 Aug 2022 09:08:32 +0000
(18:08 +0900)
committer
Tizen Window System
<tizen.windowsystem@gmail.com>
Fri, 26 Aug 2022 01:19:20 +0000
(10:19 +0900)
Change-Id: I1b5f9fefb99222d7f150743acd5c03b8a1e9e12c
src/allocator/shm.c
patch
|
blob
|
history
diff --git
a/src/allocator/shm.c
b/src/allocator/shm.c
index
3fad474
..
96a0210
100644
(file)
--- a/
src/allocator/shm.c
+++ b/
src/allocator/shm.c
@@
-128,7
+128,7
@@
shm_allocator_create_buffer(struct ds_allocator *ds_allocator,
int width, int height, uint32_t format)
{
struct ds_shm_buffer *buffer;
-
in
t bytes_per_pixel, stride;
+
size_
t bytes_per_pixel, stride;
buffer = calloc(1, sizeof *buffer);
if (!buffer)
@@
-138,8
+138,8
@@
shm_allocator_create_buffer(struct ds_allocator *ds_allocator,
// FIXME
bytes_per_pixel = 4;
- stride = width * bytes_per_pixel;
- buffer->size = stride * height;
+ stride =
(size_t)
width * bytes_per_pixel;
+ buffer->size = stride *
(size_t)
height;
buffer->shm.fd = allocate_shm_file(buffer->size);
if (buffer->shm.fd < 0) {
free(buffer);