freedreno: fix clang error in fd_get_compute_param
authorRob Herring <robh@kernel.org>
Tue, 9 May 2017 16:56:49 +0000 (11:56 -0500)
committerRob Clark <robdclark@gmail.com>
Tue, 9 May 2017 18:20:54 +0000 (14:20 -0400)
With commit 10c17f23b752 ("freedreno: core compute state support"),
Android builds fail with the following error:

external/mesa3d/src/gallium/drivers/freedreno/freedreno_screen.c:610:17: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
                        sprintf(ret, ir);
                                     ^~

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_screen.c

index 052565dcbdc9f22ff98d2b62d17497e6e496becd..57010d64587f76b072420053e431cd7e4ff9b311 100644 (file)
@@ -589,7 +589,7 @@ fd_get_compute_param(struct pipe_screen *pscreen, enum pipe_shader_ir ir_type,
                enum pipe_compute_cap param, void *ret)
 {
        struct fd_screen *screen = fd_screen(pscreen);
-       const char *ir = "ir3";
+       const char * const ir = "ir3";
 
        if (!has_compute(screen))
                return 0;