Правки предупреждений

This commit is contained in:
Andrei Astafev 2019-10-19 07:02:07 +03:00
parent c5484fa2c9
commit afcf3b2b6c
4 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
#include "paths.hpp" #include "paths.hpp"
#include <myx/base/config.hpp> #include <myx/base/config.hpp>
#include "whereami++.h" #include <myx/filesystem/whereami.hpp>
#include <paths.h> #include <paths.h>
#include <QString> #include <QString>

View File

@ -10,7 +10,7 @@ namespace {
extern "C" { extern "C" {
#endif #endif
#include <stdlib.h> #include <cstdlib>
#ifndef WAI_NOINLINE #ifndef WAI_NOINLINE
#if defined( _MSC_VER ) #if defined( _MSC_VER )
@ -143,10 +143,10 @@ int getModulePath( char* out, int capacity, int* dirname_length )
uint64_t addr = reinterpret_cast< uintptr_t >( WAI_RETURN_ADDRESS() ); uint64_t addr = reinterpret_cast< uintptr_t >( WAI_RETURN_ADDRESS() );
if ( ( low <= addr ) && ( addr <= high ) ) if ( ( low <= addr ) && ( addr <= high ) )
{ {
char* resolved; char* resolved = nullptr;
resolved = realpath( path, buffer ); resolved = realpath( path, buffer );
if ( !resolved ) if ( resolved == nullptr )
{ {
break; break;
} }
@ -185,7 +185,7 @@ int getModulePath( char* out, int capacity, int* dirname_length )
} }
} }
if ( maps ) if ( maps != nullptr )
{ {
fclose( maps ); fclose( maps );
} }

View File

@ -11,7 +11,7 @@ namespace qt {
void append_translators( QTranslatorsList& translators, const QString& appName ) void append_translators( QTranslatorsList& translators, const QString& appName )
{ {
auto* translator = new QTranslator( qApp ); auto translator = new QTranslator( qApp );
if ( translator->load( QLocale(), appName, QStringLiteral( "_" ), if ( translator->load( QLocale(), appName, QStringLiteral( "_" ),
QStringLiteral( ":/qm" ) ) ) QStringLiteral( ":/qm" ) ) )