From 7056f6308a2eea4ca84ed311a7932b6d5ed42b53 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Tue, 24 Feb 2015 01:38:14 +0100 Subject: [PATCH] Fix a -Wunused-result warning --- Source/Core/Common/Misc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/Misc.cpp b/Source/Core/Common/Misc.cpp index 3a8454a36e..f831479845 100644 --- a/Source/Core/Common/Misc.cpp +++ b/Source/Core/Common/Misc.cpp @@ -30,7 +30,8 @@ const char* GetLastErrorMsg() static __thread char err_str[buff_size] = {}; // Thread safe (XSI-compliant) - strerror_r(errno, err_str, buff_size); + if (strerror_r(errno, err_str, buff_size)) + return nullptr; #endif return err_str;