2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 06:55:30 +00:00

3143. [bug] Silence clang compiler warnings. [RT #25174]

This commit is contained in:
Mark Andrews
2011-08-18 04:52:35 +00:00
parent 7cbf770e47
commit 3a63259484
4 changed files with 19 additions and 19 deletions

View File

@@ -1,3 +1,5 @@
3143. [bug] Silence clang compiler warnings. [RT #25174]
3142. [bug] NAPTR is class agnostic. [RT #25429] 3142. [bug] NAPTR is class agnostic. [RT #25429]
3141. [bug] Silence spurious "zone serial (0) unchanged" messages 3141. [bug] Silence spurious "zone serial (0) unchanged" messages

View File

@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-dsfromkey.c,v 1.21 2011/03/24 23:47:48 tbox Exp $ */ /* $Id: dnssec-dsfromkey.c,v 1.22 2011/08/18 04:52:35 marka Exp $ */
/*! \file */ /*! \file */
@@ -292,12 +292,10 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
fatal("can't print class"); fatal("can't print class");
isc_buffer_usedregion(&nameb, &r); isc_buffer_usedregion(&nameb, &r);
isc_util_fwrite(r.base, 1, r.length, stdout); printf("%.*s ", (int)r.length, r.base);
putchar(' ');
isc_buffer_usedregion(&classb, &r); isc_buffer_usedregion(&classb, &r);
isc_util_fwrite(r.base, 1, r.length, stdout); printf("%.*s", (int)r.length, r.base);
if (lookaside == NULL) if (lookaside == NULL)
printf(" DS "); printf(" DS ");
@@ -305,8 +303,7 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
printf(" DLV "); printf(" DLV ");
isc_buffer_usedregion(&textb, &r); isc_buffer_usedregion(&textb, &r);
isc_util_fwrite(r.base, 1, r.length, stdout); printf("%.*s\n", (int)r.length, r.base);
putchar('\n');
} }
ISC_PLATFORM_NORETURN_PRE static void ISC_PLATFORM_NORETURN_PRE static void

View File

@@ -31,7 +31,7 @@
/* /*
* Principal Author: Brian Wellington * Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.59 2011/03/21 19:54:03 each Exp $ * $Id: dst_api.c,v 1.60 2011/08/18 04:52:35 marka Exp $
*/ */
/*! \file */ /*! \file */
@@ -1579,7 +1579,8 @@ write_public_key(const dst_key_t *key, int type, const char *directory) {
fprintf(fp, "%d ", key->key_ttl); fprintf(fp, "%d ", key->key_ttl);
isc_buffer_usedregion(&classb, &r); isc_buffer_usedregion(&classb, &r);
isc_util_fwrite(r.base, 1, r.length, fp); if (isc_util_fwrite(r.base, 1, r.length, fp) != r.length)
ret = DST_R_WRITEERROR;
if ((type & DST_TYPE_KEY) != 0) if ((type & DST_TYPE_KEY) != 0)
fprintf(fp, " KEY "); fprintf(fp, " KEY ");
@@ -1587,7 +1588,8 @@ write_public_key(const dst_key_t *key, int type, const char *directory) {
fprintf(fp, " DNSKEY "); fprintf(fp, " DNSKEY ");
isc_buffer_usedregion(&textb, &r); isc_buffer_usedregion(&textb, &r);
isc_util_fwrite(r.base, 1, r.length, fp); if (isc_util_fwrite(r.base, 1, r.length, fp) != r.length)
ret = DST_R_WRITEERROR;
fputc('\n', fp); fputc('\n', fp);
fflush(fp); fflush(fp);

View File

@@ -31,7 +31,7 @@
/*% /*%
* Principal Author: Brian Wellington * Principal Author: Brian Wellington
* $Id: dst_parse.c,v 1.27 2010/12/23 04:07:58 marka Exp $ * $Id: dst_parse.c,v 1.28 2011/08/18 04:52:35 marka Exp $
*/ */
#include <config.h> #include <config.h>
@@ -641,9 +641,7 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
} }
isc_buffer_usedregion(&b, &r); isc_buffer_usedregion(&b, &r);
fprintf(fp, "%s ", s); fprintf(fp, "%s %.*s\n", s, (int)r.length, r.base);
isc_util_fwrite(r.base, 1, r.length, fp);
fprintf(fp, "\n");
} }
/* Add the metadata tags */ /* Add the metadata tags */
@@ -661,14 +659,15 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
isc_buffer_init(&b, buffer, sizeof(buffer)); isc_buffer_init(&b, buffer, sizeof(buffer));
result = dns_time32_totext(when, &b); result = dns_time32_totext(when, &b);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS) {
continue; fclose(fp);
return (DST_R_INVALIDPRIVATEKEY);
}
isc_buffer_usedregion(&b, &r); isc_buffer_usedregion(&b, &r);
fprintf(fp, "%s ", timetags[i]); fprintf(fp, "%s %.*s\n", timetags[i], (int)r.length,
isc_util_fwrite(r.base, 1, r.length, fp); r.base);
fprintf(fp, "\n");
} }
} }