[PATCH 2/5] wined3d: Fix a couple of string declarations.
Henri Verbeet
hverbeet at codeweavers.com
Fri May 2 05:50:16 CDT 2014
The distinction is perhaps insignificant, but we may as well do it right.
---
dlls/wined3d/arb_program_shader.c | 2 +-
dlls/wined3d/context.c | 2 +-
dlls/wined3d/directx.c | 6 +++---
dlls/wined3d/glsl_shader.c | 2 +-
dlls/wined3d/shader.c | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index d655c10..653298a 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -3284,7 +3284,7 @@ static GLuint create_arb_blt_vertex_program(const struct wined3d_gl_info *gl_inf
GLuint program_id = 0;
GLint pos;
- const char *blt_vprogram =
+ static const char blt_vprogram[] =
"!!ARBvp1.0\n"
"PARAM c[1] = { { 1, 0.5 } };\n"
"MOV result.position, vertex.position;\n"
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index bd707eb..32cc191 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1721,7 +1721,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
* So make sure a program is assigned to each context. The first real ARBFP use will set a different
* program and the dummy program is destroyed when the context is destroyed.
*/
- const char *dummy_program =
+ static const char dummy_program[] =
"!!ARBfp1.0\n"
"MOV result.color, fragment.color.primary;\n"
"END\n";
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index eb4b48e..224992d 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -439,7 +439,7 @@ static BOOL test_arb_vs_offset_limit(const struct wined3d_gl_info *gl_info)
{
GLuint prog;
BOOL ret = FALSE;
- const char *testcode =
+ static const char testcode[] =
"!!ARBvp1.0\n"
"PARAM C[66] = { program.env[0..65] };\n"
"ADDRESS A0;"
@@ -653,7 +653,7 @@ static BOOL match_broken_nv_clip(const struct wined3d_gl_info *gl_info, const ch
GLuint prog;
BOOL ret = FALSE;
GLint pos;
- const char *testcode =
+ static const char testcode[] =
"!!ARBvp1.0\n"
"OPTION NV_vertex_program2;\n"
"MOV result.clip[0], 0.0;\n"
@@ -790,7 +790,7 @@ static BOOL match_broken_arb_fog(const struct wined3d_gl_info *gl_info, const ch
float color[4] = {0.0f, 1.0f, 0.0f, 0.0f};
GLuint prog;
GLint err_pos;
- static const char *program_code =
+ static const char program_code[] =
"!!ARBfp1.0\n"
"OPTION ARB_fog_linear;\n"
"MOV result.color, {1.0, 0.0, 0.0, 0.0};\n"
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index cece6c1..d0f2b71 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -6022,7 +6022,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
GLhandleARB vshader_id, pshader_id;
const char *blt_pshader;
- static const char *blt_vshader =
+ static const char blt_vshader[] =
"#version 120\n"
"void main(void)\n"
"{\n"
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 3a1fc12..a9b3d9f 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -1151,7 +1151,7 @@ void shader_dump_dst_param(const struct wined3d_shader_dst_param *param,
if (write_mask && write_mask != WINED3DSP_WRITEMASK_ALL)
{
- static const char *write_mask_chars = "xyzw";
+ static const char write_mask_chars[] = "xyzw";
TRACE(".");
if (write_mask & WINED3DSP_WRITEMASK_0) TRACE("%c", write_mask_chars[0]);
@@ -1207,7 +1207,7 @@ void shader_dump_src_param(const struct wined3d_shader_src_param *param,
if (swizzle != WINED3DSP_NOSWIZZLE)
{
- static const char *swizzle_chars = "xyzw";
+ static const char swizzle_chars[] = "xyzw";
DWORD swizzle_x = swizzle & 0x03;
DWORD swizzle_y = (swizzle >> 2) & 0x03;
DWORD swizzle_z = (swizzle >> 4) & 0x03;
--
1.7.10.4
More information about the wine-patches
mailing list