Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Mar 2005 08:30:06 GMT
From:      Stefan Farfeleder <stefanf@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   bin/79232: WARNS6 clean libexec/comsat
Message-ID:  <200503260830.j2Q8U6j9028581@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/79232; it has been noted by GNATS.

From: Stefan Farfeleder <stefanf@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: bin/79232: WARNS6 clean libexec/comsat
Date: Sat, 26 Mar 2005 09:23:05 +0100

 > -	sprintf(buf, "%s/%.*s", _PATH_MAILDIR, (int)sizeof(utmp[0].ut_name),
 > -	    name);
 > +	sprintf(buf, "%s/%.*s", _PATH_MAILDIR, sizeof(utmp[0].ut_name), name);
 >  	if (*file != '/') {
 >  		sprintf(buf2, "%s/%.*s", _PATH_MAILDIR,
 > -		    (int)sizeof(utmp[0].ut_name), file);
 > +		      sizeof(utmp[0].ut_name), file);
 
 
 > -	(void)snprintf(tty, sizeof(tty), "%s%.*s",
 > -	    _PATH_DEV, (int)sizeof(utp->ut_line), utp->ut_line);
 > +	snprintf(tty, sizeof(tty), "%s%.*s",
 > +	      _PATH_DEV, sizeof(utp->ut_line), utp->ut_line);
 
 
 > -		(void)fprintf(tp, 
 > +		fprintf(tp, 
 >  		    "%s\007New mail for %s@%.*s\007 has arrived%s%s%s:%s----%s",
 > -		    cr, name, (int)sizeof(hostname), hostname,
 > +		    cr, utp->ut_name, sizeof(hostname), hostname,
 >  		    folder ? cr : "", folder ? "to " : "", folder ? file : "",
 >  		    cr, cr);
 
 Those (int) casts are needed, removing them is an error.
 
 Stefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503260830.j2Q8U6j9028581>