Fix potentially uninitialized variable warnings

This commit is contained in:
jp9000
2014-07-12 11:59:46 -07:00
parent f675c8029f
commit a27f2fbb3a
3 changed files with 7 additions and 6 deletions
+4 -3
View File
@@ -502,11 +502,12 @@ void device_load_swapchain(device_t device, swapchain_t swap)
device->cur_swap = swap;
if (swap)
if (swap) {
hdc = swap->wi->hdc;
if (!wgl_make_current(hdc, device->plat->hrc))
blog(LOG_ERROR, "device_load_swapchain (GL) failed");
if (!wgl_make_current(hdc, device->plat->hrc))
blog(LOG_ERROR, "device_load_swapchain (GL) failed");
}
}
void device_present(device_t device)
+2 -2
View File
@@ -86,7 +86,7 @@ void bounds_get_center(struct vec3 *dst, const struct bounds *b)
void bounds_transform(struct bounds *dst, const struct bounds *b,
const struct matrix4 *m)
{
struct bounds temp;
struct bounds temp = {0};
bool b_init = false;
int i;
@@ -123,7 +123,7 @@ void bounds_transform(struct bounds *dst, const struct bounds *b,
void bounds_transform3x4(struct bounds *dst, const struct bounds *b,
const struct matrix3 *m)
{
struct bounds temp;
struct bounds temp = {0};
bool b_init = false;
int i;
+1 -1
View File
@@ -997,7 +997,7 @@ static void obs_source_draw_async_texture(struct obs_source *source)
bool limited_range = yuv && !source->async_full_range;
const char *type = yuv ? "DrawMatrix" : "Draw";
bool def_draw = (!effect);
technique_t tech;
technique_t tech = NULL;
if (def_draw) {
effect = obs_get_default_effect();