From 63dd0d02136a0fa2eb7895a77600bb82f3472cc8 Mon Sep 17 00:00:00 2001 From: didg Date: Wed, 11 Apr 2007 01:11:10 +0000 Subject: [PATCH] remove warnings --- libatalk/adouble/ad_flush.c | 9 ++++----- libatalk/adouble/ad_open.c | 8 +++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/libatalk/adouble/ad_flush.c b/libatalk/adouble/ad_flush.c index 7cef3f7e..e942607c 100644 --- a/libatalk/adouble/ad_flush.c +++ b/libatalk/adouble/ad_flush.c @@ -1,5 +1,5 @@ /* - * $Id: ad_flush.c,v 1.8 2006-09-29 09:39:16 didg Exp $ + * $Id: ad_flush.c,v 1.9 2007-04-11 01:11:10 didg Exp $ * * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. @@ -139,22 +139,21 @@ int ad_copy_header(struct adouble *add, struct adouble *ads) /* ------------------- */ int ad_rebuild_sfm_header(struct adouble *ad) { - u_int32_t eid; u_int32_t temp; u_int16_t attr; - char *buf, *nentp; + char *buf; /* * Rebuild any header information that might have changed. */ buf = ad->ad_data; /* FIXME */ -// temp = htonl( ad->ad_magic ); +/* temp = htonl( ad->ad_magic ); */ temp = ad->ad_magic; memcpy(buf, &temp, sizeof( temp )); -// temp = htonl( ad->ad_version ); +/* temp = htonl( ad->ad_version ); */ temp = ad->ad_version; memcpy(buf +4, &temp, sizeof( temp )); diff --git a/libatalk/adouble/ad_open.c b/libatalk/adouble/ad_open.c index c0a2f104..127651a5 100644 --- a/libatalk/adouble/ad_open.c +++ b/libatalk/adouble/ad_open.c @@ -1,5 +1,5 @@ /* - * $Id: ad_open.c,v 1.38 2006-09-29 09:44:59 didg Exp $ + * $Id: ad_open.c,v 1.39 2007-04-11 01:11:10 didg Exp $ * * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -692,10 +692,7 @@ static int ad_header_sfm_read(struct adouble *ad, struct stat *hst) { char *buf = ad->ad_data; const struct entry *eid; - u_int16_t nentries; - int len; ssize_t header_len; - static int warning = 0; struct stat st; /* read the header */ @@ -710,9 +707,10 @@ static int ad_header_sfm_read(struct adouble *ad, struct stat *hst) memcpy(&ad->ad_magic, buf, sizeof( ad->ad_magic )); memcpy(&ad->ad_version, buf + 4, sizeof( ad->ad_version )); - /* FIXME in the the great Microsoft tradition they aren't in network order */ + /* FIXME in the great Microsoft tradition they aren't in network order */ #if 0 if (ad->ad_magic == SFM_MAGIC && ad->ad_version == AD_VERSION1) { + static int warning = 0; if (!warning) { LOG(log_debug, logtype_default, "notice: fixing up byte-swapped v1 magic/version."); warning++; -- 2.39.2