Skip to content

Commit

Permalink
Silence compiler warnings when building with Clang or new engine headers
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jul 1, 2019
1 parent a221d68 commit 578a0cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ void UI_FreeCustomStrings( void );

inline size_t Q_strncpy( char *dst, const char *src, size_t size )
{
register char *d = dst;
register const char *s = src;
register size_t n = size;
char *d = dst;
const char *s = src;
size_t n = size;

if( !dst || !src || !size )
return 0;
Expand Down
9 changes: 8 additions & 1 deletion extdll_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ GNU General Public License for more details.
#ifndef EXTDLL_H
#define EXTDLL_H

// includes xash3d_types.h on Xash3D FWGS, which defines EXPORT
// but harmless on any HLSDK or Xash3D
#include "const.h"

#ifndef EXPORT
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#elif defined(__GNUC__)
#define EXPORT __attribute__((visibility("default")))
#else
#define EXPORT
#endif

#endif

// shut-up compiler warnings
#ifdef _MSC_VER
Expand Down

0 comments on commit 578a0cb

Please sign in to comment.