This bug has been reported as NTP community bug 3103 zsave_warn format string
used without arguments.
http://bugs.ntp.org/show_bug.cgi?id=3103
This patch may be removed after upgrading to a version of NTP that has
bug 3103 fixed.
*** sntp/libopts/save.c
--- sntp/libopts/save.c
*************** find_dir_name(tOptions * opts, int * p_f
*** 128,134 ****
}
if (pzEnv == NULL) {
! fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNotDef, pzDir);
return NULL;
}
--- 128,134 ----
}
if (pzEnv == NULL) {
! fprintf(stderr, zsave_warn, opts->pzProgName, "\"\"");
fprintf(stderr, zNotDef, pzDir);
return NULL;
}
*************** find_file_name(tOptions * opts, int * p_
*** 180,186 ****
*/
if (errno != ENOENT) {
bogus_name:
! fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoStat, errno, strerror(errno), pzDir);
if (free_dir_name)
AGFREE(pzDir);
--- 180,186 ----
*/
if (errno != ENOENT) {
bogus_name:
! fprintf(stderr, zsave_warn, opts->pzProgName,pzDir);
fprintf(stderr, zNoStat, errno, strerror(errno), pzDir);
if (free_dir_name)
AGFREE(pzDir);
*************** find_file_name(tOptions * opts, int * p_
*** 234,240 ****
*/
if (stat(pzDir, &stBuf) != 0) {
if (errno != ENOENT) {
! fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoStat, errno, strerror(errno),
pzDir);
AGFREE(pzDir);
--- 234,240 ----
*/
if (stat(pzDir, &stBuf) != 0) {
if (errno != ENOENT) {
! fprintf(stderr, zsave_warn, opts->pzProgName, pzDir);
fprintf(stderr, zNoStat, errno, strerror(errno),
pzDir);
AGFREE(pzDir);
*************** open_sv_file(tOptions * opts)
*** 531,537 ****
fp = fopen(pzFName, "w" FOPEN_BINARY_FLAG);
if (fp == NULL) {
! fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName);
if (free_name)
AGFREE(pzFName);
--- 531,537 ----
fp = fopen(pzFName, "w" FOPEN_BINARY_FLAG);
if (fp == NULL) {
! fprintf(stderr, zsave_warn, opts->pzProgName, pzFName);
fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName);
if (free_name)
AGFREE(pzFName);