diff options
author | Haruna <haru@dotalux.com> | 2013-12-16 19:25:58 -0800 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2013-12-16 19:25:58 -0800 |
commit | 8b84026c292fed6f6218278c870c4f8839fbd40a (patch) | |
tree | 4b62aa52844a1916db1f18faba8b9cf29ff30810 /src/common/sql.c | |
parent | 9e223137eba56dcd41bececf4360f321c9117247 (diff) | |
parent | 3917562fc493c031bb20181b5d9ae6ab15ce9b76 (diff) | |
download | hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.tar.gz hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.tar.bz2 hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.tar.xz hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.zip |
Merge pull request #237 from HerculesWS/warnings
This adds an Xcode project file (for those who develop on OS X) and fixes several - potential or real - issues we detected thanks to its more strict warnings settings. It also updates the unix build script with similar warning settings.
Diffstat (limited to 'src/common/sql.c')
-rw-r--r-- | src/common/sql.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/sql.c b/src/common/sql.c index 0e06d6d18..79ccc8e92 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -1036,7 +1036,7 @@ void Sql_HerculesUpdateCheck(Sql* self) { fseek (ufp,1,SEEK_SET);/* woo. skip the # */ if( fgets(timestamp,sizeof(timestamp),ufp) ) { - unsigned int timestampui = atol(timestamp); + unsigned int timestampui = (unsigned int)atol(timestamp); if( SQL_ERROR == SQL->Query(self, "SELECT 1 FROM `sql_updates` WHERE `timestamp` = '%u' LIMIT 1", timestampui) ) Sql_ShowDebug(self); if( Sql_NumRows(self) != 1 ) { @@ -1079,7 +1079,7 @@ void Sql_HerculesUpdateSkip(Sql* self,const char *filename) { fseek (ifp,1,SEEK_SET);/* woo. skip the # */ if( fgets(timestamp,sizeof(timestamp),ifp) ) { - unsigned int timestampui = atol(timestamp); + unsigned int timestampui = (unsigned int)atol(timestamp); if( SQL_ERROR == SQL->Query(self, "SELECT 1 FROM `sql_updates` WHERE `timestamp` = '%u' LIMIT 1", timestampui) ) Sql_ShowDebug(self); else if( Sql_NumRows(self) == 1 ) { |