summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2016-09-16 18:28:26 -0400
committerRobert Foss <robert.foss@collabora.com>2016-10-25 17:35:41 -0400
commiteab9ec3c995d94700b1f715454beda907931cf89 (patch)
tree3698b3d01ce19f88d837d698beea838b2c82bfa0
parentc51c10f68da33a0cee0f6db3145e371b33bed163 (diff)
downloadgbm_gralloc-eab9ec3c995d94700b1f715454beda907931cf89.tar.gz
gbm_gralloc-eab9ec3c995d94700b1f715454beda907931cf89.tar.xz
Silence compiler type narrowing errors
Add static_cast to op, to prevent compiler warnings. Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r--gralloc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gralloc.cpp b/gralloc.cpp
index 809862d..482dfcd 100644
--- a/gralloc.cpp
+++ b/gralloc.cpp
@@ -99,13 +99,14 @@ static int gbm_mod_perform(const struct gralloc_module_t *mod, int op, ...)
struct gbm_module_t *dmod = (struct gbm_module_t *) mod;
va_list args;
int err;
+ uint32_t uop = static_cast<uint32_t>(op);
err = gbm_init(dmod);
if (err)
return err;
va_start(args, op);
- switch (op) {
+ switch (uop) {
case GRALLOC_MODULE_PERFORM_GET_DRM_FD:
{
int *fd = va_arg(args, int *);