From 212379e88207236d8d2fcaaac1636cd1520406b1 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 11 Jul 2012 11:35:47 +0000 Subject: Fixed plenty "comparison of unsigned expression >= 0 is always true" warnings in multiple compilers git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16394 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/map/pc.h b/src/map/pc.h index 84ae71535..c5f1aaa02 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -633,15 +633,17 @@ enum e_pc_permission { #define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \ 1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2))) //Checks if the given class value corresponds to a player class. [Skotlex] -#define pcdb_checkid(class_) \ +//JOB_NOVICE isn't checked for class_ is supposed to be unsigned +#define pcdb_checkid_sub(class_) \ ( \ - ( (class_) >= JOB_NOVICE && (class_) < JOB_MAX_BASIC ) \ + ( (class_) < JOB_MAX_BASIC ) \ || ( (class_) >= JOB_NOVICE_HIGH && (class_) <= JOB_DARK_COLLECTOR ) \ || ( (class_) >= JOB_RUNE_KNIGHT && (class_) <= JOB_MECHANIC_T2 ) \ || ( (class_) >= JOB_BABY_RUNE && (class_) <= JOB_BABY_MECHANIC2 ) \ || ( (class_) >= JOB_SUPER_NOVICE_E && (class_) <= JOB_SUPER_BABY_E ) \ || ( (class_) >= JOB_KAGEROU && (class_) < JOB_MAX ) \ ) +#define pcdb_checkid(class_) pcdb_checkid_sub((unsigned int)class_) // clientside display macros (values to the left/right of the "+") #ifdef RENEWAL -- cgit v1.2.3-70-g09d2