Skip to content

Commit

Permalink
Thy Warning Consumed: Clanging in Windows Part 1 (MSVC-CLANG) (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadDeCoDeR committed Jun 1, 2023
1 parent 9b32a13 commit 5643aa2
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 2 deletions.
3 changes: 3 additions & 0 deletions neo/framework/Compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __COMPRESSOR_H__
#define __COMPRESSOR_H__

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Woverloaded-virtual"
#endif
/*
===============================================================================
Expand Down
4 changes: 4 additions & 0 deletions neo/framework/DeclEntityDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __DECLENTITYDEF_H__
#define __DECLENTITYDEF_H__

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Woverloaded-virtual"
#endif

/*
===============================================================================
Expand Down
4 changes: 4 additions & 0 deletions neo/framework/DemoFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __DEMOFILE_H__
#define __DEMOFILE_H__

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Woverloaded-virtual"
#endif

/*
===============================================================================
Expand Down
4 changes: 4 additions & 0 deletions neo/framework/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __FILE_H__
#define __FILE_H__

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Woverloaded-virtual"
#endif

/*
==============================================================
Expand Down
4 changes: 4 additions & 0 deletions neo/framework/File_SaveGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __FILE_SAVEGAME_H__
#define __FILE_SAVEGAME_H__

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Woverloaded-virtual"
#endif

#include <zlib.h>

// Listing of the types of files within a savegame package
Expand Down
2 changes: 1 addition & 1 deletion neo/idlib/CmdArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void idCmdArgs::TokenizeString( const char* text, bool keepAsStrings )

len = token.Length();

if( totalLen + len + 1 > sizeof( tokenized ) )
if( totalLen + len + 1ULL > sizeof( tokenized ) )
{
return; // this is usually something malicious
}
Expand Down
4 changes: 4 additions & 0 deletions neo/idlib/Heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ If you have questions concerning this license or the applicable additional terms
#pragma GCC diagnostic ignored "-Wdeprecated"
#else
#pragma warning(disable: 4595) //GK: non-member operator new or delete functions may not be declared inline
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wimplicit-exception-spec-mismatch"
#pragma clang diagnostic ignored "-Winline-new-delete"
#endif
#endif
/*
===============================================================================
Expand Down
4 changes: 4 additions & 0 deletions neo/idlib/Lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __LEXER_H__
#define __LEXER_H__

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Wignored-qualifiers"
#endif

/*
===============================================================================
Expand Down
4 changes: 4 additions & 0 deletions neo/idlib/geometry/DrawVert.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ If you have questions concerning this license or the applicable additional terms
#define NORMALMAP_BYTE_TO_FLOAT( x ) VERTEX_BYTE_TO_FLOAT( x ) //( (x) - 128.0f ) * ( 1.0f / 127.0f )
#define NORMALMAP_FLOAT_TO_BYTE( x ) VERTEX_FLOAT_TO_BYTE( x ) //idMath::Ftob( 128.0f + 127.0f * (x) + 0.5f )

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Wignored-qualifiers"
#endif

/*
================================================
halfFloat_t
Expand Down
4 changes: 4 additions & 0 deletions neo/idlib/sys/sys_intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ If you have questions concerning this license or the applicable additional terms
#if defined(USE_INTRINSICS)
#include <emmintrin.h>
#endif

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Wignored-attributes"
#endif
/*
================================================================================================
Expand Down
4 changes: 4 additions & 0 deletions neo/sys/sys_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ If you have questions concerning this license or the applicable additional terms
#include "../idlib/CmdArgs.h"
#include "../idlib/precompiled.h"

#if defined(_MSC_VER) && defined(__clang__)
#pragma clang diagnostic ignored "-Wmicrosoft-enum-forward-reference"
#endif

/*
===============================================================================
Expand Down
2 changes: 1 addition & 1 deletion neo/sys/win32/win_wndproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ LONG WINAPI MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
break;
}
// GK: Start
case WM_DPICHANGED:
case WM_DPICHANGED: //GK: Microsoft Docs Lie??? This is available on Windows 7
int dpi = HIWORD(wParam);
// A little shortcut cheat using Microsoft's Documentation
switch (dpi) {
Expand Down

0 comments on commit 5643aa2

Please sign in to comment.