summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-15 19:12:48 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-15 19:12:48 +0800
commitbee0621d20c4ff0ad165be128e1ab8c5b33168d7 (patch)
tree116cbfaddf3c7a30c2a0c1a2d1e6773cb3a55718 /util
parent7cb42a94fb0aa1c3fe242699a2bec79efe04f7e1 (diff)
downloadpttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar
pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.gz
pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.bz2
pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.lz
pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.xz
pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.zst
pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.zip
fix compile error & warning free
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1766 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/merge_dir.c5
-rw-r--r--util/shmctl.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/util/merge_dir.c b/util/merge_dir.c
index 44fcd1f2..2b2fd85b 100644
--- a/util/merge_dir.c
+++ b/util/merge_dir.c
@@ -9,9 +9,10 @@ void usage() {
fileheader_t *fh;
-int dir_cmp(fileheader_t *a, fileheader_t *b)
+int dir_cmp(const void *a, const void *b)
{
- return strncasecmp(a->filename, b->filename, 12);
+ return strncasecmp(((fileheader_t *)a)->filename,
+ ((fileheader_t *)b)->filename, 12);
}
int main(int argc, char **argv) {
diff --git a/util/shmctl.c b/util/shmctl.c
index 8b30c758..82778162 100644
--- a/util/shmctl.c
+++ b/util/shmctl.c
@@ -210,7 +210,6 @@ inline void utmpsort(int sortall)
userinfo_t *uentp;
int count, i, ns;
short nusers[MAX_BOARD];
- boardheader_t *HBcache[HOTBOARDCACHE];
SHM->UTMPbusystate = 1;
@@ -265,6 +264,7 @@ inline void utmpsort(int sortall)
{
#if HOTBOARDCACHE
int k, r, last = 0, top = 0;
+ boardheader_t *HBcache[HOTBOARDCACHE];
#endif
for (i = 0; i < SHM->Bnumber; ++i)
if (SHM->bcache[i].brdname[0] != 0){