diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-03 13:52:26 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-03 14:05:55 +0300 |
commit | 21c099c5be5779f1115aa0c6b3ec9d6578dc6042 (patch) | |
tree | 705b2eb11a69a2cdff4b6c42aaaae6b35e4e435b /source/blender/windowmanager/intern/wm_splash_screen.c | |
parent | a620501acbde3fe03ff31c8c5a45453200f0c361 (diff) |
Fix compiler warning after recent change to splash screen version
Diffstat (limited to 'source/blender/windowmanager/intern/wm_splash_screen.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_splash_screen.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm_splash_screen.c b/source/blender/windowmanager/intern/wm_splash_screen.c index 9cbcab9e3b2..d3f7661a008 100644 --- a/source/blender/windowmanager/intern/wm_splash_screen.c +++ b/source/blender/windowmanager/intern/wm_splash_screen.c @@ -113,36 +113,37 @@ static void wm_block_splash_add_label(uiBlock *block, const char *label, int x, static void wm_block_splash_add_labels(uiBlock *block, int x, int y) { /* Version number. */ - const char *version_suffix = NULL; + const char *version_cycle = NULL; bool show_build_info = true; if (STREQ(STRINGIFY(BLENDER_VERSION_CYCLE), "alpha")) { - version_suffix = " Alpha"; + version_cycle = " Alpha"; } else if (STREQ(STRINGIFY(BLENDER_VERSION_CYCLE), "beta")) { - version_suffix = " Beta"; + version_cycle = " Beta"; } else if (STREQ(STRINGIFY(BLENDER_VERSION_CYCLE), "rc")) { - version_suffix = " Release Candidate"; + version_cycle = " Release Candidate"; show_build_info = false; } else if (STREQ(STRINGIFY(BLENDER_VERSION_CYCLE), "release")) { - version_suffix = STRINGIFY(BLENDER_VERSION_CHAR); + version_cycle = STRINGIFY(BLENDER_VERSION_CHAR); show_build_info = false; } + const char *version_cycle_number = ""; + if (strlen(STRINGIFY(BLENDER_VERSION_CYCLE_NUMBER))) { + version_cycle_number = " " STRINGIFY(BLENDER_VERSION_CYCLE_NUMBER); + } + char version_buf[256] = "\0"; BLI_snprintf(version_buf, sizeof(version_buf), - "v %d.%d%s", + "v %d.%d%s%s", BLENDER_VERSION / 100, BLENDER_VERSION % 100, - version_suffix); - - const char *cycle_number_suffix = STRINGIFY(BLENDER_VERSION_CYCLE_NUMBER); - if (strlen(cycle_number_suffix)) { - BLI_snprintf(version_buf, sizeof(version_buf), "%s %s", version_buf, cycle_number_suffix); - } + version_cycle, + version_cycle_number); wm_block_splash_add_label(block, version_buf, x, &y); |