~sircmpwn/xrgears

38fe90c3db0501e9d9f66d4660963bcce156862f — Lubosz Sarnecki 1 year, 10 months ago 48b6b04
Fix -Wsign-compare.
M CMakeLists.txt => CMakeLists.txt +0 -4
@@ 24,7 24,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    -Wno-padded

    # probably we want to fix these
    -Wno-sign-conversion
    -Wno-switch-enum
    -Wno-double-promotion
    -Wno-zero-as-null-pointer-constant


@@ 38,7 37,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    -Wno-format-nonliteral
    -Wno-unused-macros
    -Wno-shadow-field
    -Wno-sign-compare
    -Wno-disabled-macro-expansion
    -Wno-covered-switch-default
    -Wno-cast-qual


@@ 54,8 52,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    # We want to ignore these
    -Wno-missing-field-initializers
    -Wno-unused-parameter
    # we want to fix these
    -Wno-sign-compare
  )
endif()


M fonts/stb_font_consolas_24_latin1.inl => fonts/stb_font_consolas_24_latin1.inl +0 -1
@@ 734,4 734,3 @@ static void stb_font_consolas_24_latin1(stb_fontchar font[STB_FONT_consolas_24_l
#define STB_SOMEFONT_NUM_CHARS           STB_FONT_consolas_24_latin1_NUM_CHARS
#define STB_SOMEFONT_LINE_SPACING        STB_FONT_consolas_24_latin1_LINE_SPACING
#endif


M vitamin-k/render/vikRenderer.hpp => vitamin-k/render/vikRenderer.hpp +1 -1
@@ 351,7 351,7 @@ class Renderer {
    // Select physical device to be used for the Vulkan example
    // Defaults to the first device unless specified by command line
    uint32_t selected_device = 0;
    if (settings->gpu > gpu_count - 1) {
    if (settings->gpu > (int) gpu_count - 1) {
      vik_log_f("Selected device index %d is out of range,"
                " reverting to device 0"
                " (use --list-gpus to show available Vulkan devices)",

M vitamin-k/window/vikWindowDirectMode.hpp => vitamin-k/window/vikWindowDirectMode.hpp +1 -1
@@ 78,7 78,7 @@ class WindowDirectMode : public Window {
    if (displays.size() < 1)
      vik_log_f("No non-desktop output available.");

    if (settings->display > displays.size() - 1) {
    if (settings->display > (int) displays.size() - 1) {
      vik_log_w("Requested display %d, but only %d displays are available.",
                settings->display, displays.size());


M vitamin-k/window/vikWindowWayland.hpp => vitamin-k/window/vikWindowWayland.hpp +3 -3
@@ 304,7 304,7 @@ class WindowWayland : public Window {
  }

  Display* get_display_from_output(wl_output* output) {
    for (int i = 0; i < displays.size(); i++) {
    for (int i = 0; i < (int) displays.size(); i++) {
      if (displays[i].output == output)
        return &displays[i];
    }


@@ 359,7 359,7 @@ class WindowWayland : public Window {

  void validate_display() {
    Display *d;
    if (settings->display > displays.size()) {
    if (settings->display > (int) displays.size()) {
      vik_log_e("Requested display %d, but only %d displays are available.",
                settings->display, displays.size());



@@ 374,7 374,7 @@ class WindowWayland : public Window {
  void validate_mode() {
    Display* d = current_display();

    if (settings->mode > d->modes.size()) {
    if (settings->mode > (int) d->modes.size()) {
      vik_log_e("Requested mode %d, but only %d modes"
                " are available on display %d.",
                settings->mode,

M vitamin-k/window/vikWindowXCB.hpp => vitamin-k/window/vikWindowXCB.hpp +1 -1
@@ 97,7 97,7 @@ class WindowXCB : public Window {
    if (settings->fullscreen) {
      get_randr_outputs();

      if (settings->display > displays.size() - 1) {
      if (settings->display > (int) displays.size() - 1) {
        vik_log_w("Requested display %d, but only %d displays are available.",
                  settings->display, displays.size());