mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-04 10:33:30 +00:00
Merge pull request #1355 from allenh1/fix-gcc-9-warnings
Fix GCC 9 Warnings
This commit is contained in:
commit
f84e490ebe
|
@ -2235,7 +2235,7 @@ obs_data_t *obs_sceneitem_get_private_settings(obs_sceneitem_t *item)
|
|||
return item->private_settings;
|
||||
}
|
||||
|
||||
static inline transform_val(struct vec2 *v2, struct matrix4 *transform)
|
||||
static inline void transform_val(struct vec2 *v2, struct matrix4 *transform)
|
||||
{
|
||||
struct vec3 v;
|
||||
vec3_set(&v, v2->x, v2->y, 0.0f);
|
||||
|
@ -2644,11 +2644,6 @@ static void build_current_order_info(obs_scene_t *scene,
|
|||
|
||||
obs_sceneitem_t *item = scene->first_item;
|
||||
while (item) {
|
||||
struct obs_sceneitem_order_info info = {
|
||||
.group = NULL,
|
||||
.item = item
|
||||
};
|
||||
|
||||
da_push_back(items, &item);
|
||||
|
||||
if (item->is_group) {
|
||||
|
@ -2659,8 +2654,6 @@ static void build_current_order_info(obs_scene_t *scene,
|
|||
obs_sceneitem_t *sub_item = sub_scene->first_item;
|
||||
|
||||
while (sub_item) {
|
||||
info.group = item;
|
||||
info.item = sub_item;
|
||||
da_push_back(items, &item);
|
||||
|
||||
sub_item = sub_item->next;
|
||||
|
@ -2679,7 +2672,6 @@ static void build_current_order_info(obs_scene_t *scene,
|
|||
static bool sceneitems_match2(obs_scene_t *scene,
|
||||
struct obs_sceneitem_order_info *items, size_t size)
|
||||
{
|
||||
obs_sceneitem_t *item = scene->first_item;
|
||||
struct obs_sceneitem_order_info *cur_items;
|
||||
size_t cur_size;
|
||||
|
||||
|
@ -2693,7 +2685,7 @@ static bool sceneitems_match2(obs_scene_t *scene,
|
|||
struct obs_sceneitem_order_info *new = &items[i];
|
||||
struct obs_sceneitem_order_info *old = &cur_items[i];
|
||||
|
||||
if (new->group != old->group || new->item != new->item) {
|
||||
if (new->group != old->group || new->item != old->item) {
|
||||
bfree(cur_items);
|
||||
return false;
|
||||
}
|
||||
|
@ -2713,7 +2705,6 @@ bool obs_scene_reorder_items2(obs_scene_t *scene,
|
|||
obs_scene_addref(scene);
|
||||
full_lock(scene);
|
||||
|
||||
bool order_matches = true;
|
||||
if (sceneitems_match2(scene, item_order, item_order_size)) {
|
||||
full_unlock(scene);
|
||||
obs_scene_release(scene);
|
||||
|
|
|
@ -789,11 +789,11 @@ char *obs_find_data_file(const char *file)
|
|||
{
|
||||
struct dstr path = {0};
|
||||
|
||||
const char *result = find_libobs_data_file(file);
|
||||
char *result = find_libobs_data_file(file);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
for (int i = 0; i < core_module_paths.num; ++i) {
|
||||
for (size_t i = 0; i < core_module_paths.num; ++i) {
|
||||
if (check_path(file, core_module_paths.array[i].array, &path))
|
||||
return path.array;
|
||||
}
|
||||
|
@ -811,7 +811,7 @@ void obs_add_data_path(const char *path)
|
|||
|
||||
bool obs_remove_data_path(const char *path)
|
||||
{
|
||||
for (int i = 0; i < core_module_paths.num; ++i) {
|
||||
for (size_t i = 0; i < core_module_paths.num; ++i) {
|
||||
int result = dstr_cmp(&core_module_paths.array[i], path);
|
||||
|
||||
if (result == 0) {
|
||||
|
|
Loading…
Reference in a new issue