1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

libtt: Resolve all remaining format-security warnings.

This commit is contained in:
Peter Howkins 2012-08-26 22:19:27 +01:00
parent 8c8a5380ca
commit 8479d150e2
7 changed files with 21 additions and 21 deletions

View file

@ -157,7 +157,7 @@ print(FILE *f) const
(char *)_sel_filename); (char *)_sel_filename);
} }
if (_sel_objid_p) { if (_sel_objid_p) {
fprintf(f,catgets(_ttcatd, 6, 8, "Select by objid key:")); fprintf(f, "%s", catgets(_ttcatd, 6, 8, "Select by objid key:"));
_sel_objid_key->print(f); _sel_objid_key->print(f);
fprintf(f,"\n"); fprintf(f,"\n");
} }
@ -166,25 +166,25 @@ print(FILE *f) const
(char *)_sel_type); (char *)_sel_type);
} }
if (_diag_badform_p) { if (_diag_badform_p) {
fprintf(f,catgets(_ttcatd, 6, 10, fprintf(f, "%s", catgets(_ttcatd, 6, 10,
"Diagnose badly formed entities\n")); "Diagnose badly formed entities\n"));
} }
if (_diag_exist_p) { if (_diag_exist_p) {
fprintf(f,catgets(_ttcatd, 6, 11, "Diagnose references to " fprintf(f, "%s", catgets(_ttcatd, 6, 11, "Diagnose references to "
"non-existent entities\n")); "non-existent entities\n"));
} }
if (_disp_id_p) { if (_disp_id_p) {
fprintf(f,catgets(_ttcatd, 6, 12, "Display ids\n")); fprintf(f, "%s", catgets(_ttcatd, 6, 12, "Display ids\n"));
} }
if (_disp_mand_p) { if (_disp_mand_p) {
fprintf(f,catgets(_ttcatd, 6, 13, "Display mandatory data\n")); fprintf(f, "%s", catgets(_ttcatd, 6, 13, "Display mandatory data\n"));
} }
if (_disp_prop_p) { if (_disp_prop_p) {
fprintf(f,catgets(_ttcatd, 6, 14, fprintf(f, "%s", catgets(_ttcatd, 6, 14,
"Display properties and values data\n")); "Display properties and values data\n"));
} }
if (_repair_netisam_p) { if (_repair_netisam_p) {
fprintf(f,catgets(_ttcatd, 6, 15, fprintf(f, "%s", catgets(_ttcatd, 6, 15,
"Invoke NetISAM isrepair() function before " "Invoke NetISAM isrepair() function before "
"inspecting\n")); "inspecting\n"));
} }
@ -194,7 +194,7 @@ print(FILE *f) const
(char *)_repair_type); (char *)_repair_type);
} }
if (_repair_delete_p) { if (_repair_delete_p) {
fprintf(f,catgets(_ttcatd, 6, 17, "Repair by deleting\n")); fprintf(f, "%s", catgets(_ttcatd, 6, 17, "Repair by deleting\n"));
} }
fprintf(f,catgets(_ttcatd, 6, 18, "Debugging printout level %d\n"), fprintf(f,catgets(_ttcatd, 6, 18, "Debugging printout level %d\n"),
_debug_level); _debug_level);

View file

@ -280,11 +280,11 @@ process_spec()
// way through and put the spec on the repair list. // way through and put the spec on the repair list.
if ((bad_flags & BAD_NOFILE)!=0) { if ((bad_flags & BAD_NOFILE)!=0) {
printf(catgets(_ttcatd, 6, 20, printf("%s", catgets(_ttcatd, 6, 20,
"Error: no file for spec.\n")); "Error: no file for spec.\n"));
} }
if ((bad_flags & BAD_NOTYPE)!=0) { if ((bad_flags & BAD_NOTYPE)!=0) {
printf(catgets(_ttcatd, 6, 21, printf("%s", catgets(_ttcatd, 6, 21,
"Error: no type for spec.\n")); "Error: no type for spec.\n"));
} }
if ((bad_flags & BAD_TYPE)!=0) { if ((bad_flags & BAD_TYPE)!=0) {
@ -293,16 +293,16 @@ process_spec()
type.operator const char *()); type.operator const char *());
} }
if ((bad_flags & BAD_MULTITYPE)!=0) { if ((bad_flags & BAD_MULTITYPE)!=0) {
printf(catgets(_ttcatd, 6, 23,"Error: spec has multiple " printf("%s", catgets(_ttcatd, 6, 23,"Error: spec has multiple "
"values for type property.\n")); "values for type property.\n"));
} }
if ((bad_flags & BAD_FILE_STAT)!=0) { if ((bad_flags & BAD_FILE_STAT)!=0) {
printf(catgets(_ttcatd, 6, 24,"Error: ")); printf("%s", catgets(_ttcatd, 6, 24,"Error: "));
printf("%s: %s", (char *)filename, strerror(save_errno)); printf("%s: %s", (char *)filename, strerror(save_errno));
} }
if ((bad_flags & BAD_TYPED_FILESPEC)!=0) { if ((bad_flags & BAD_TYPED_FILESPEC)!=0) {
printf(catgets(_ttcatd, 6, 26,"Error: ")); printf("%s", catgets(_ttcatd, 6, 26,"Error: "));
printf("%s: internal spec for file has an otype.\n", printf("%s: internal spec for file has an otype.\n",
(char *)filename); (char *)filename);
} }

View file

@ -142,7 +142,7 @@ main(int argc, char **argv)
if (!opts->set_opts(argc, argv)) if (!opts->set_opts(argc, argv))
{ {
fprintf(stderr, catgets(_ttcatd, 6, 2, fprintf(stderr, "%s", catgets(_ttcatd, 6, 2,
"Usage:\n" "Usage:\n"
"ttdbck [-f file] [-k objkey] [-t type] [-bx] \n" "ttdbck [-f file] [-k objkey] [-t type] [-bx] \n"
"[-impa] [-IZ] [-F newfilename] [-T newtype] [mountpoints]\n")); "[-impa] [-IZ] [-F newfilename] [-T newtype] [mountpoints]\n"));
@ -156,7 +156,7 @@ main(int argc, char **argv)
if (opts->repairing_p() && if (opts->repairing_p() &&
!opts->selecting_p() && !opts->selecting_p() &&
!opts->diagnosing_p()) { !opts->diagnosing_p()) {
fprintf(stderr, fprintf(stderr, "%s",
catgets(_ttcatd, 6, 3, catgets(_ttcatd, 6, 3,
"ttdbck: you must specify a selection " "ttdbck: you must specify a selection "
"[-fkt] option or a diagnosis [-bx] option\n" "[-fkt] option or a diagnosis [-bx] option\n"
@ -201,7 +201,7 @@ main(int argc, char **argv)
// already been output. // already been output.
if (status==0) { if (status==0) {
fprintf(stderr, fprintf(stderr, "%s",
catgets(_ttcatd, 6, 25, catgets(_ttcatd, 6, 25,
"ttdbck: no errors found.\n")); "ttdbck: no errors found.\n"));
} }
@ -592,7 +592,7 @@ pisamerr(const char *func, const char *name)
} }
switch (iserrno) { switch (iserrno) {
case EBADFILE: case EBADFILE:
fprintf(stderr, fprintf(stderr, "%s",
catgets(_ttcatd, 6, 6, catgets(_ttcatd, 6, 6,
"ttdbck: try 'ttdbck -I'.\n")); "ttdbck: try 'ttdbck -I'.\n"));
break; break;

View file

@ -466,7 +466,7 @@ usage(FILE *fs) const
" %s -h\n"), " %s -h\n"),
(char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name,
(char *)_prog_name ); (char *)_prog_name );
fprintf( fs, fprintf( fs, "%s",
catgets(_ttcatd, 8, 14, catgets(_ttcatd, 8, 14,
"\t-L do not perform a cp(1)\n" "\t-L do not perform a cp(1)\n"
"\t-v print the version number and quit\n" "\t-v print the version number and quit\n"

View file

@ -382,7 +382,7 @@ usage(FILE *fs) const
" %s -h\n"), " %s -h\n"),
(char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name,
(char *)_prog_name ); (char *)_prog_name );
fprintf( fs, fprintf( fs, "%s",
catgets(_ttcatd, 8, 6, catgets(_ttcatd, 8, 6,
"\t-L do not perform a mv(1)\n" "\t-L do not perform a mv(1)\n"
"\t-v print the version number and quit\n" "\t-v print the version number and quit\n"

View file

@ -474,7 +474,7 @@ check_cycle(_Tt_otype_ptr otype, _Tt_otype **path, int top)
} else { } else {
for (int i = 0; i <= top-1; i++) { for (int i = 0; i <= top-1; i++) {
if (path[i] == anc_otype.c_pointer()) { if (path[i] == anc_otype.c_pointer()) {
fprintf(stderr, fprintf(stderr, "%s",
catgets(_ttcatd, 4, 38, "cyclic otype inheritance hierarchy -\n {")); catgets(_ttcatd, 4, 38, "cyclic otype inheritance hierarchy -\n {"));
for (int j = i; j <= top-1; j++) { for (int j = i; j <= top-1; j++) {
fprintf(stderr," %s", (char *) path[j]->otid()); fprintf(stderr," %s", (char *) path[j]->otid());

View file

@ -551,7 +551,7 @@ usage( FILE *fs ) const
" %s -h\n"), " %s -h\n"),
(char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name, (char *)_prog_name,
(char *)_prog_name ); (char *)_prog_name );
fprintf( fs, fprintf( fs, "%s",
catgets(_ttcatd, 7, 3, catgets(_ttcatd, 7, 3,
"\tc create an archive\n" "\tc create an archive\n"
"\tt list an archive's contents\n" "\tt list an archive's contents\n"