Merge pull request #2522 from ascent12/build_fix

Build fix
This commit is contained in:
Drew DeVault 2018-08-27 08:16:25 -04:00 committed by GitHub
commit fed6976840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -12,6 +12,7 @@ project(
add_project_arguments('-Wno-unused-parameter', language: 'c') add_project_arguments('-Wno-unused-parameter', language: 'c')
add_project_arguments('-Wno-unused-function', language: 'c') add_project_arguments('-Wno-unused-function', language: 'c')
add_project_arguments('-Wno-unused-result', language: 'c') add_project_arguments('-Wno-unused-result', language: 'c')
add_project_arguments('-DWL_HIDE_DEPRECATED', language: 'c')
add_project_arguments('-DWLR_USE_UNSTABLE', language: 'c') add_project_arguments('-DWLR_USE_UNSTABLE', language: 'c')
cc = meson.get_compiler('c') cc = meson.get_compiler('c')

View file

@ -52,7 +52,7 @@ static struct sway_container *output_in_direction(const char *direction_string,
{ "right", WLR_DIRECTION_RIGHT }, { "right", WLR_DIRECTION_RIGHT },
}; };
enum wlr_direction direction; enum wlr_direction direction = 0;
for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); ++i) { for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); ++i) {
if (strcasecmp(names[i].name, direction_string) == 0) { if (strcasecmp(names[i].name, direction_string) == 0) {