Code cleanup: fix various compiler warnings on clang/macOS.

This commit is contained in:
Brecht Van Lommel 2018-03-16 05:08:28 +01:00
parent 3692a2bcb3
commit 2816694b05
7 changed files with 8 additions and 8 deletions

View File

@ -41,7 +41,7 @@ static struct {
struct GPUShader *bloom_downsample_sh[2];
struct GPUShader *bloom_upsample_sh[2];
struct GPUShader *bloom_resolve_sh[2];
} e_data = {NULL}; /* Engine data */
} e_data = {{NULL}}; /* Engine data */
extern char datatoc_effect_bloom_frag_glsl[];

View File

@ -48,7 +48,7 @@ static struct {
/* Theses are just references, not actually allocated */
struct GPUTexture *depth_src;
struct GPUTexture *color_src;
} e_data = {NULL}; /* Engine data */
} e_data = {{NULL}}; /* Engine data */
extern char datatoc_ambient_occlusion_lib_glsl[];
extern char datatoc_common_view_lib_glsl[];

View File

@ -34,7 +34,7 @@
static struct {
struct GPUShader *sss_sh[4];
} e_data = {NULL}; /* Engine data */
} e_data = {{NULL}}; /* Engine data */
extern char datatoc_common_view_lib_glsl[];
extern char datatoc_common_uniforms_lib_glsl[];

View File

@ -51,7 +51,7 @@ static struct {
struct {
uint pos, nor;
} attr_id;
} g_presets_3d = {0};
} g_presets_3d = {{0}};
/* We may want 2D presets later. */

View File

@ -1814,7 +1814,7 @@ static int wm_operator_tool_set_exec(bContext *C, wmOperator *op)
{
ScrArea *sa = CTX_wm_area(C);
bToolDef tool_def = {0};
bToolDef tool_def = {{0}};
tool_def.index = RNA_int_get(op->ptr, "index");
tool_def.spacetype = sa->spacetype;

View File

@ -40,7 +40,7 @@
/** \name Public API
* \{ */
static wmMsgTypeInfo wm_msg_types[WM_MSG_TYPE_NUM] = {NULL};
static wmMsgTypeInfo wm_msg_types[WM_MSG_TYPE_NUM] = {{{NULL}}};
typedef void (*wmMsgTypeInitFn)(wmMsgTypeInfo *);

View File

@ -300,14 +300,14 @@ void WM_msg_subscribe_ID(
struct wmMsgBus *mbus, ID *id, const wmMsgSubscribeValue *msg_val_params,
const char *id_repr)
{
wmMsgParams_RNA msg_key_params = {NULL};
wmMsgParams_RNA msg_key_params = {{{NULL}}};
RNA_id_pointer_create(id, &msg_key_params.ptr);
WM_msg_subscribe_rna_params(mbus, &msg_key_params, msg_val_params, id_repr);
}
void WM_msg_publish_ID(struct wmMsgBus *mbus, ID *id)
{
wmMsgParams_RNA msg_key_params = {NULL};
wmMsgParams_RNA msg_key_params = {{{NULL}}};
RNA_id_pointer_create(id, &msg_key_params.ptr);
WM_msg_publish_rna_params(mbus, &msg_key_params);
}