Fix warnings
This commit is contained in:
parent
e7e7a942f8
commit
185709734d
4 changed files with 18 additions and 8 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <X11/Xatom.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/XKBlib.h>
|
||||
#include "nel/misc/debug.h"
|
||||
|
||||
|
||||
|
@ -566,7 +567,7 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server)
|
|||
}
|
||||
else
|
||||
{
|
||||
k = XKeycodeToKeysym(_dpy, keyCode, 0);
|
||||
k = XkbKeycodeToKeysym(_dpy, keyCode, 0, 0);
|
||||
}
|
||||
|
||||
// send CEventKeyDown event only if keyCode is defined
|
||||
|
|
|
@ -1633,18 +1633,27 @@ CTopology::CTopology()
|
|||
{
|
||||
}
|
||||
|
||||
// convert a 2 characters string to uint16
|
||||
#ifdef NL_LITTLE_ENDIAN
|
||||
# define NELID16(x) (uint16((x[0] << 8) | (x[1])))
|
||||
#else
|
||||
# define NELID16(x) (uint16((x[1] << 8) | (x[0])))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
inline
|
||||
void CTopology::serial(NLMISC::IStream& f)
|
||||
{
|
||||
|
||||
uint version = 0;
|
||||
|
||||
uint16 check = (uint16)'Tp';
|
||||
uint16 check = NELID16("Tp");
|
||||
f.serial(check);
|
||||
|
||||
if (check != (uint16)'TP')
|
||||
if (check != NELID16("TP"))
|
||||
{
|
||||
nlassert(check == (uint16)'Tp');
|
||||
nlassert(check == NELID16("Tp"));
|
||||
version = f.serialVersion(3);
|
||||
}
|
||||
|
||||
|
@ -2285,7 +2294,7 @@ sint CWhiteCell::getHeight(CWorldPosition const& wpos) const
|
|||
inline
|
||||
void CWhiteCell::serial(NLMISC::IStream& f)
|
||||
{
|
||||
f.serialCheck((uint16)'WC');
|
||||
f.serialCheck(NELID16("WC"));
|
||||
if (f.isReading())
|
||||
_HeightMap = I16x16Layer::load(f);
|
||||
else
|
||||
|
|
|
@ -177,8 +177,8 @@ GenderExtractor::GenderExtractor(const std::string & literal, const std::string&
|
|||
|
||||
|
||||
static const char * es[] ={"e", "e1", "e2", "e3"};
|
||||
static char * fs[] ={"f", "f1", "f2", "f3"};
|
||||
static char * hs[] ={"h", "h1", "h2", "h3"};
|
||||
static const char * fs[] ={"f", "f1", "f2", "f3"};
|
||||
static const char * hs[] ={"h", "h1", "h2", "h3"};
|
||||
|
||||
const char * e = es[level];
|
||||
const char * f = fs[level];
|
||||
|
|
|
@ -331,7 +331,7 @@ REGISTER_VAR_INDIRECT(CVarSBrick, "var_sbrick");
|
|||
|
||||
|
||||
/* for special item */
|
||||
char *SpecialItemProp[] =
|
||||
const char *SpecialItemProp[] =
|
||||
{
|
||||
"Durability",
|
||||
"Weight",
|
||||
|
|
Loading…
Reference in a new issue