I don't want to see these warnings at the end of my compilation logs
anymore.

ok?

Index: desktop.c
===================================================================
RCS file: /cvs/src/gnu/usr.sbin/mkhybrid/src/desktop.c,v
retrieving revision 1.4
diff -u -p -r1.4 desktop.c
--- desktop.c   29 Mar 2016 10:21:41 -0000      1.4
+++ desktop.c   26 Feb 2019 16:38:08 -0000
@@ -95,28 +95,28 @@ make_desktop(hfsvol *vol, int end)
        
            /* open file */
            if((hfp = hfs_open(vol, DB)) == 0)
-               err(1, hfs_error);
+               err(1, "%s", hfs_error);
 
            /* "write" file */
            write_fork(hfp, clps);
 
            /* set DB file attributes */
            if (hfs_fsetattr(hfp, &ent) < 0)
-               err(1, hfs_error);
+               err(1, "%s", hfs_error);
 
            /* find the real start of the file */
            end += hce->hfs_ce_size;
 
            /* close DB file */
            if (hfs_close(hfp, end, 0) < 0)
-               err(1, hfs_error);
+               err(1, "%s", hfs_error);
        }
        else
        {
            /* if it already exists, then make sure it has the correct
               type/creator and flags */
            if(hfs_setattr(vol, DB, &ent) < 0)
-               err(1, hfs_error);
+               err(1, "%s", hfs_error);
        }
 
        /* setup "Desktop DF" file as an empty file */
@@ -128,7 +128,7 @@ make_desktop(hfsvol *vol, int end)
 
        /* set DB file attributes */
        if (hfs_setattr(vol, DF, &ent) < 0)
-           err(1, hfs_error);
+           err(1, "%s", hfs_error);
        return 0;
 }
 #endif /* APPLE_HYB */ 
Index: write.c
===================================================================
RCS file: /cvs/src/gnu/usr.sbin/mkhybrid/src/write.c,v
retrieving revision 1.4
diff -u -p -r1.4 write.c
--- write.c     9 Sep 2015 20:02:31 -0000       1.4
+++ write.c     26 Feb 2019 16:38:08 -0000
@@ -1545,7 +1545,7 @@ static int file_gen()
                /* exit with the error */
                if (*hce->error)
                    fprintf(stderr, "%s\n", hce->error);
-               err(1, hfs_error);
+               err(1, "%s", hfs_error);
            }
            else
            {
@@ -1575,7 +1575,7 @@ static int file_gen()
       if (gen_mac_label(&mac_boot)) {
        if (*hce->error)
            fprintf(stderr, "%s\n", hce->error);
-       err(1, hfs_error);
+       err(1, "%s", hfs_error);
       }
     }
 

Reply via email to