Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package hfsutils for openSUSE:Factory checked in at 2024-05-05 12:10:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hfsutils (Old) and /work/SRC/openSUSE:Factory/.hfsutils.new.1880 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hfsutils" Sun May 5 12:10:22 2024 rev:23 rq:1171551 version:3.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/hfsutils/hfsutils.changes 2024-02-23 16:40:57.781840280 +0100 +++ /work/SRC/openSUSE:Factory/.hfsutils.new.1880/hfsutils.changes 2024-05-05 12:10:28.271193924 +0200 @@ -1,0 +2,8 @@ +Wed Mar 20 17:46:24 UTC 2024 - Valentin Lefebvre <valentin.lefeb...@suse.com> + +- Fix build with gcc14, incompatible pointer and deprecated declaration + [bsc#1221691] + + gcc14-fix-incompatible-pointer-type-const-char.patch + + deprecated-declaration-tcl-interp-result.patch + +------------------------------------------------------------------- New: ---- deprecated-declaration-tcl-interp-result.patch gcc14-fix-incompatible-pointer-type-const-char.patch BETA DEBUG BEGIN: New: + gcc14-fix-incompatible-pointer-type-const-char.patch + deprecated-declaration-tcl-interp-result.patch New: [bsc#1221691] + gcc14-fix-incompatible-pointer-type-const-char.patch + deprecated-declaration-tcl-interp-result.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hfsutils.spec ++++++ --- /var/tmp/diff_new_pack.vmRyxu/_old 2024-05-05 12:10:30.491274270 +0200 +++ /var/tmp/diff_new_pack.vmRyxu/_new 2024-05-05 12:10:30.495274414 +0200 @@ -1,7 +1,7 @@ # # spec file for package hfsutils # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ Patch4: hfsutils-%{version}-errno.dif Patch5: hfsutils-exclusive-open.patch Patch6: bug1160268-no-common.patch +Patch7: gcc14-fix-incompatible-pointer-type-const-char.patch +Patch8: deprecated-declaration-tcl-interp-result.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: tcl-devel @@ -64,6 +66,8 @@ %patch -P 4 %patch -P 5 -p1 %patch -P 6 -p1 +%patch -P 7 -p1 +%patch -P 8 -p1 %build autoreconf --force --install ++++++ deprecated-declaration-tcl-interp-result.patch ++++++ --- hfsutils-3.2.6/tclhfs.c 2024-03-20 09:52:28.335548848 +0100 +++ hfsutils-3.2.6-new/tclhfs.c 2024-03-20 18:33:20.837534468 +0100 @@ -34,6 +34,7 @@ # include <limits.h> # include <errno.h> +#define USE_INTERP_RESULT # include <tcl.h> # include "tclhfs.h" @@ -238,7 +239,7 @@ int getdir(Tcl_Interp *interp, volref *v str = direntstr(&ent); if (str == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -283,7 +284,7 @@ int file_cmd(ClientData clientData, Tcl_ switch (argc) { case 1: - interp->result = "missing command"; + Tcl_SetResult(interp, "missing command", TCL_STATIC); return TCL_ERROR; case 2: @@ -301,7 +302,9 @@ int file_cmd(ClientData clientData, Tcl_ if (offset == -1) return error(interp, 0); - sprintf(interp->result, "%lu", offset); + char result[CHARLEN(unsigned long) + 1]; + sprintf(result, "%lu", offset); + Tcl_SetResult(interp, result, TCL_DYNAMIC); } else if (strcmp(argv[1], "stat") == 0) { @@ -314,7 +317,7 @@ int file_cmd(ClientData clientData, Tcl_ str = direntstr(&ent); if (str == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -322,7 +325,7 @@ int file_cmd(ClientData clientData, Tcl_ } else if (strcmp(argv[1], "getfork") == 0) { - interp->result = (hfs_getfork(file) == 0) ? "data" : "rsrc"; + Tcl_SetResult(interp, (hfs_getfork(file) == 0) ? "data" : "rsrc", TCL_STATIC); } else { @@ -345,7 +348,7 @@ int file_cmd(ClientData clientData, Tcl_ fork = 1; else { - interp->result = "bad arg to setfork: must be data or rsrc"; + Tcl_SetResult(interp, "bad arg to setfork: must be data or rsrc", TCL_STATIC); return TCL_ERROR; } @@ -362,7 +365,9 @@ int file_cmd(ClientData clientData, Tcl_ if (offset == -1) return error(interp, 0); - sprintf(interp->result, "%lu", offset); + char interpResult[CHARLEN(unsigned long) +1]; + sprintf(interpResult, "%lu", offset); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else if (strcmp(argv[1], "read") == 0) { @@ -374,14 +379,14 @@ int file_cmd(ClientData clientData, Tcl_ if (bytes < 0) { - interp->result = "size must be >= 0"; + Tcl_SetResult(interp, "size must be >= 0", TCL_STATIC); return TCL_ERROR; } mem = ALLOC(char, bytes + 1); if (mem == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -404,7 +409,9 @@ int file_cmd(ClientData clientData, Tcl_ if (bytes == -1) return error(interp, 0); - sprintf(interp->result, "%lu", bytes); + char interpResult[CHARLEN(unsigned long) +1]; + sprintf(interpResult, "%lu", bytes); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else { @@ -433,7 +440,7 @@ int file_cmd(ClientData clientData, Tcl_ whence = HFS_SEEK_END; else { - interp->result = "bad arg 3: must be start, current, or end"; + Tcl_SetResult(interp, "bad arg 3: must be start, current, or end", TCL_STATIC); return TCL_ERROR; } @@ -441,7 +448,9 @@ int file_cmd(ClientData clientData, Tcl_ if (offset == -1) return error(interp, 0); - sprintf(interp->result, "%lu", offset); + char interpResult[CHARLEN(unsigned long) +1]; + sprintf(interpResult, "%lu", offset); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else { @@ -501,12 +510,15 @@ void file_ref(Tcl_Interp *interp, volref int new; do - sprintf(interp->result, "hfsfile%d", id++); - while (Tcl_GetCommandInfo(interp, interp->result, &info)); + { + char interpResult[CHARLEN(double)+8]; + sprintf(interpResult, "hfsfile%d", id++); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); + } while (Tcl_GetCommandInfo(interp, Tcl_GetStringResult(interp), &info)); fref->file = file; fref->interp = interp; - fref->cmd = Tcl_CreateCommand(interp, interp->result, + fref->cmd = Tcl_CreateCommand(interp, Tcl_GetStringResult(interp), file_cmd, fref, file_del); entry = Tcl_CreateHashEntry(&files, (char *) fref, &new); @@ -617,7 +629,7 @@ int copynative(Tcl_Interp *interp, volre if (srcvref->vol == dstvref->vol && ent.cnid == cnid) { - interp->result = "source and destination files are the same"; + Tcl_SetResult(interp, "source and destination files are the same", TCL_STATIC); hfs_close(ifile); return TCL_ERROR; } @@ -671,7 +683,7 @@ int copyin(Tcl_Interp *interp, hfsvol *v copyfile = cpi_raw; else { - interp->result = "bad mode: must be macb, binh, text, or raw"; + Tcl_SetResult(interp, "bad mode: must be macb, binh, text, or raw", TCL_STATIC); return TCL_ERROR; } @@ -706,7 +718,7 @@ int copyout(Tcl_Interp *interp, hfsvol * copyfile = cpo_raw; else { - interp->result = "bad mode: must be macb, binh, text, or raw"; + Tcl_SetResult(interp, "bad mode: must be macb, binh, text, or raw", TCL_STATIC); return TCL_ERROR; } @@ -820,7 +832,7 @@ int vol_cmd(ClientData clientData, Tcl_I switch (argc) { case 1: - interp->result = "missing command"; + Tcl_SetResult(interp, "missing command", TCL_STATIC); return TCL_ERROR; case 2: @@ -836,21 +848,28 @@ int vol_cmd(ClientData clientData, Tcl_I hfsvolent ent; hfs_vstat(vol, &ent); - sprintf(interp->result, "%lu %lu", ent.totbytes, ent.freebytes); + char interpResult[2*CHARLEN(unsigned long)+4]; + sprintf(interpResult, "%lu %lu", ent.totbytes, ent.freebytes); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else if (strcmp(argv[1], "crdate") == 0) { hfsvolent ent; hfs_vstat(vol, &ent); - sprintf(interp->result, "%ld", (long) ent.crdate); + + char interpResult[2*CHARLEN(long)+1]; + sprintf(interpResult, "%ld", (long) ent.crdate); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else if (strcmp(argv[1], "mddate") == 0) { hfsvolent ent; hfs_vstat(vol, &ent); - sprintf(interp->result, "%ld", (long) ent.mddate); + char interpResult[2*CHARLEN(long)+1]; + sprintf(interpResult, "%ld", (long) ent.mddate); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else if (strcmp(argv[1], "islocked") == 0) { @@ -858,9 +877,9 @@ int vol_cmd(ClientData clientData, Tcl_I hfs_vstat(vol, &ent); if (ent.flags & HFS_ISLOCKED) - interp->result = "1"; + Tcl_SetResult(interp, "1", TCL_STATIC); else - interp->result = "0"; + Tcl_SetResult(interp, "0", TCL_STATIC); } else if (strcmp(argv[1], "umount") == 0) { @@ -868,9 +887,11 @@ int vol_cmd(ClientData clientData, Tcl_I if (err_umount == -1) return error(interp, 0); } - else if (strcmp(argv[1], "cwd") == 0) - sprintf(interp->result, "%lu", vref->cwd); - else if (strcmp(argv[1], "path") == 0) + else if (strcmp(argv[1], "cwd") == 0) { + char interpResult[CHARLEN(unsigned long) +1]; + sprintf(interpResult, "%lu", vref->cwd); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); + } else if (strcmp(argv[1], "path") == 0) { char name[HFS_MAX_FLEN + 1]; long id; @@ -889,7 +910,7 @@ int vol_cmd(ClientData clientData, Tcl_I /* reverse the resulting list */ - if (Tcl_SplitList(interp, interp->result, &listc, (const char ***) &listv) != TCL_OK) + if (Tcl_SplitList(interp, Tcl_GetStringResult(interp), &listc, (const char ***) &listv) != TCL_OK) return TCL_ERROR; for (i = 0; i < listc / 2; ++i) @@ -917,7 +938,7 @@ int vol_cmd(ClientData clientData, Tcl_I return error(interp, 0); } else if (strcmp(argv[1], "sepchar") == 0) - interp->result = ":"; + Tcl_SetResult(interp, ":", TCL_STATIC); else { Tcl_AppendResult(interp, "bad command \"", argv[1], @@ -964,7 +985,7 @@ int vol_cmd(ClientData clientData, Tcl_I fref = ALLOC(fileref, 1); if (fref == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -989,7 +1010,7 @@ int vol_cmd(ClientData clientData, Tcl_I str = direntstr(&ent); if (str == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -1042,7 +1063,7 @@ int vol_cmd(ClientData clientData, Tcl_I if (fargv == 0) { - interp->result = "globbing error"; + Tcl_SetResult(interp, "globbing error", NULL); return TCL_ERROR; } @@ -1098,14 +1119,14 @@ int vol_cmd(ClientData clientData, Tcl_I if (strlen(argv[3]) != 4 || strlen(argv[4]) != 4) { - interp->result = "type and creator must be 4 character strings"; + Tcl_SetResult(interp, "type and creator must be 4 character strings", TCL_STATIC); return TCL_ERROR; } fref = ALLOC(fileref, 1); if (fref == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -1163,7 +1184,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (argc < 2) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } @@ -1178,7 +1199,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (argc < 3 || argc > 4) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } @@ -1197,8 +1218,10 @@ int cmd_hfs(ClientData clientData, Tcl_I if (nparts > 1) { - sprintf(interp->result, "must specify partition number " + char interpResult[CHARLEN(double)+45]; + sprintf(interpResult, "must specify partition number " "(%d available)", nparts); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); return TCL_ERROR; } else if (nparts == -1) @@ -1210,7 +1233,7 @@ int cmd_hfs(ClientData clientData, Tcl_I vref = ALLOC(volref, 1); if (vref == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -1231,10 +1254,13 @@ int cmd_hfs(ClientData clientData, Tcl_I entry = Tcl_CreateHashEntry(&volumes, (char *) vref, &new); do - sprintf(interp->result, "hfsvol%d", id++); - while (Tcl_GetCommandInfo(interp, interp->result, &info)); + { + char interpResult[CHARLEN(double)+8]; + sprintf(interpResult, "hfsvol%d", id++); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); + } while (Tcl_GetCommandInfo(interp, Tcl_GetStringResult(interp), &info)); - Tcl_CreateCommand(interp, interp->result, + Tcl_CreateCommand(interp, Tcl_GetStringResult(interp), vol_cmd, vref, vol_del); } else if (strcmp(argv[1], "zero") == 0) @@ -1244,7 +1270,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (argc != 4) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } @@ -1254,7 +1280,9 @@ int cmd_hfs(ClientData clientData, Tcl_I if (do_zero(argv[2], nparts, &len) == -1) return error(interp, 0); - sprintf(interp->result, "%lu", len); + char interpResult[CHARLEN(unsigned long) +1]; + sprintf(interpResult, "%lu", len); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else if (strcmp(argv[1], "mkpart") == 0) { @@ -1262,7 +1290,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (argc != 4) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } @@ -1278,7 +1306,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (argc != 3) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } @@ -1286,7 +1314,9 @@ int cmd_hfs(ClientData clientData, Tcl_I nparts = hfs_nparts(argv[2]); suid_disable(); - sprintf(interp->result, "%d", nparts); + char interpResult[CHARLEN(double)+1]; + sprintf(interpResult, "%d", nparts); + Tcl_SetResult(interp, interpResult, TCL_DYNAMIC); } else if (strcmp(argv[1], "format") == 0) { @@ -1294,7 +1324,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (argc < 5 || argc > 6) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } @@ -1315,7 +1345,7 @@ int cmd_hfs(ClientData clientData, Tcl_I { free(listv); - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -1355,7 +1385,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (argc != 5) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } @@ -1364,8 +1394,8 @@ int cmd_hfs(ClientData clientData, Tcl_I (strcmp(argv[3], "latin1") != 0 && strcmp(argv[3], "macroman") != 0)) { - interp->result = "bad arg to chartrans: " - "charsets must be one of latin1, macroman"; + Tcl_SetResult(interp, "bad arg to chartrans: " + "charsets must be one of latin1, macroman", TCL_STATIC); return TCL_ERROR; } @@ -1383,7 +1413,7 @@ int cmd_hfs(ClientData clientData, Tcl_I if (result == 0) { - interp->result = "out of memory"; + Tcl_SetResult(interp, "out of memory", TCL_STATIC); return TCL_ERROR; } @@ -1393,41 +1423,40 @@ int cmd_hfs(ClientData clientData, Tcl_I { if (argc != 2) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } - interp->result = (char *) hfsutils_version; + Tcl_SetResult(interp, (char *)hfsutils_version, TCL_VOLATILE); } else if (strcmp(argv[1], "copyright") == 0) { if (argc != 2) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } - - interp->result = (char *) hfsutils_copyright; + Tcl_SetResult(interp, (char *) hfsutils_copyright, TCL_VOLATILE); } else if (strcmp(argv[1], "author") == 0) { if (argc != 2) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } - interp->result = (char *) hfsutils_author; + Tcl_SetResult(interp, (char *) hfsutils_author, TCL_VOLATILE); } else if (strcmp(argv[1], "license") == 0) { if (argc != 2) { - interp->result = "wrong # args"; + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); return TCL_ERROR; } - interp->result = (char *) hfsutils_license; + Tcl_SetResult(interp, (char *) hfsutils_license, TCL_VOLATILE); } else { @@ -1454,7 +1483,7 @@ int cmd_exit(ClientData clientData, Tcl_ if (argc > 2) { - interp->result = "wrong # args: should be \"exit ?returnCode?\""; + Tcl_SetResult(interp, "wrong # args: should be \"exit ?returnCode?\"", TCL_STATIC); return TCL_ERROR; } ++++++ gcc14-fix-incompatible-pointer-type-const-char.patch ++++++ diff -Ppdru hfsutils-3.2.6/charset.c hfsutils-3.2.6-new/charset.c --- hfsutils-3.2.6/charset.c 1998-11-02 23:08:23.000000000 +0100 +++ hfsutils-3.2.6-new/charset.c 2024-03-20 09:44:55.297242529 +0100 @@ -151,7 +151,7 @@ UCS2 *cs_unicode(char *mstr, int *lenptr * NAME: charset->latin1() * DESCRIPTION: return a Latin-1 (ISO 8859-1) string for MacOS Standard Roman */ -char *cs_latin1(char *mstr, int *lenptr) +char *cs_latin1(const char *mstr, int *lenptr) { int ilen, olen, i; char *latin1, *ptr; @@ -229,7 +229,7 @@ void mktable(void) * NAME: charset->macroman() * DESCRIPTION: return a MacOS Standard Roman string for Latin-1 (ISO 8859-1) */ -char *cs_macroman(char *lstr, int *lenptr) +char *cs_macroman(const char *lstr, int *lenptr) { int ilen, olen, i; char *macroman, *ptr; diff -Ppdru hfsutils-3.2.6/charset.h hfsutils-3.2.6-new/charset.h --- hfsutils-3.2.6/charset.h 1998-04-11 10:26:53.000000000 +0200 +++ hfsutils-3.2.6-new/charset.h 2024-03-20 09:45:06.257071470 +0100 @@ -23,5 +23,5 @@ typedef unsigned short UCS2; UCS2 *cs_unicode(char *, int *); -char *cs_latin1(char *, int *); -char *cs_macroman(char *, int *); +char *cs_latin1(const char *, int *); +char *cs_macroman(const char *, int *); diff -Ppdru hfsutils-3.2.6/copyin.c hfsutils-3.2.6-new/copyin.c --- hfsutils-3.2.6/copyin.c 2024-03-19 16:06:38.350690737 +0100 +++ hfsutils-3.2.6-new/copyin.c 2024-03-20 09:51:14.812330826 +0100 @@ -82,13 +82,13 @@ int fork_macb(const char *srcname, const if (bytes == (unsigned long) -1) { ERROR(errno, "error reading data"); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } else if (bytes != chunk) { ERROR(EIO, "read incomplete chunk"); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -98,13 +98,13 @@ int fork_macb(const char *srcname, const if (bytes == (unsigned long) -1) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } else if (bytes != chunk) { ERROR(EIO, "wrote incomplete chunk"); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } @@ -125,7 +125,7 @@ int do_macb(const char *srcname, const c if (hfs_setfork(ofile, 0) == -1) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } @@ -135,7 +135,7 @@ int do_macb(const char *srcname, const c if (hfs_setfork(ofile, 1) == -1) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } @@ -240,7 +240,7 @@ int do_text(const char *srcname, const c if (chunk == -1) { ERROR(errno, "error reading source file"); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } else if (chunk == 0) @@ -257,7 +257,7 @@ int do_text(const char *srcname, const c if (ptr == 0) { ERROR(ENOMEM, 0); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -267,13 +267,13 @@ int do_text(const char *srcname, const c if (bytes == -1) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } else if (bytes != len) { ERROR(EIO, "wrote incomplete chunk"); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } } @@ -297,7 +297,7 @@ int do_raw(const char *srcname, const ch if (chunk == -1) { ERROR(errno, "error reading source file"); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } else if (chunk == 0) @@ -307,13 +307,13 @@ int do_raw(const char *srcname, const ch if (bytes == -1) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } else if (bytes != chunk) { ERROR(EIO, "wrote incomplete chunk"); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } } @@ -455,14 +455,14 @@ void closefiles(const char *srcname, con if (ofile && hfs_close(ofile) == -1 && *result == 0) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; *result = -1; } if (close(ifile) == -1 && *result == 0) { ERROR(errno, "error closing source file"); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; *result = -1; } } @@ -487,7 +487,7 @@ int cpi_macb(const char *srcname, hfsvol ifile = opensrc(srcname, &dsthint, ".bin", 1); if (ifile == -1) { - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -496,7 +496,7 @@ int cpi_macb(const char *srcname, hfsvol ERROR(errno, "error reading MacBinary file header"); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -505,7 +505,7 @@ int cpi_macb(const char *srcname, hfsvol ERROR(EINVAL, "invalid MacBinary file header"); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -518,7 +518,7 @@ int cpi_macb(const char *srcname, hfsvol ERROR(EINVAL, "unknown, unsupported, or corrupt MacBinary file"); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -527,7 +527,7 @@ int cpi_macb(const char *srcname, hfsvol ERROR(EINVAL, "unsupported MacBinary file version"); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -537,7 +537,7 @@ int cpi_macb(const char *srcname, hfsvol ERROR(EINVAL, "invalid MacBinary file header (bad file name)"); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -549,7 +549,7 @@ int cpi_macb(const char *srcname, hfsvol ERROR(EINVAL, "invalid MacBinary file header (bad file length)"); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -563,7 +563,7 @@ int cpi_macb(const char *srcname, hfsvol if (ofile == 0) { close(ifile); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } @@ -684,7 +684,7 @@ int cpi_binh(const char *srcname, hfsvol ifile = opensrc(srcname, &dsthint, ".hqx", 0); if (ifile == -1) { - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -693,7 +693,7 @@ int cpi_binh(const char *srcname, hfsvol ERROR(errno, bh_error); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -701,7 +701,7 @@ int cpi_binh(const char *srcname, hfsvol { bh_close(); close(ifile); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -712,26 +712,26 @@ int cpi_binh(const char *srcname, hfsvol { bh_close(); close(ifile); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } result = do_binh(ofile, dsize, rsize); if (result == -1) - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; if (bh_close() == -1 && result == 0) { ERROR(errno, bh_error); - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; result = -1; } if (result == 0 && hfs_fstat(ofile, &ent) == -1) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; result = -1; } @@ -741,7 +741,7 @@ int cpi_binh(const char *srcname, hfsvol if (result == 0 && hfs_fsetattr(ofile, &ent) == -1) { ERROR(errno, hfs_error); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; result = -1; } @@ -763,7 +763,7 @@ int cpi_text(const char *srcname, hfsvol ifile = opensrc(srcname, &dsthint, ".txt", 0); if (ifile == -1) { - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -771,7 +771,7 @@ int cpi_text(const char *srcname, hfsvol if (ofile == 0) { close(ifile); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } @@ -795,7 +795,7 @@ int cpi_raw(const char *srcname, hfsvol ifile = opensrc(srcname, &dsthint, 0, 1); if (ifile == -1) { - hfs_error_path = srcname; + hfs_error_path = (char *)srcname; return -1; } @@ -803,7 +803,7 @@ int cpi_raw(const char *srcname, hfsvol if (ofile == 0) { close(ifile); - hfs_error_path = dstname; + hfs_error_path = (char *)dstname; return -1; } diff -Ppdru hfsutils-3.2.6/tclhfs.c hfsutils-3.2.6-new/tclhfs.c --- hfsutils-3.2.6/tclhfs.c 2024-03-19 16:16:44.288981185 +0100 +++ hfsutils-3.2.6-new/tclhfs.c 2024-03-20 09:52:28.335548848 +0100 @@ -190,7 +190,7 @@ char *direntstr(hfsdirent *ent) argv[argc++] = "bkdate"; argv[argc++] = bkdate; - return Tcl_Merge(argc, argv); + return Tcl_Merge(argc, (const char **)argv); } /* @@ -275,7 +275,7 @@ void file_del(ClientData clientData) */ static int file_cmd(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) + int argc, const char *argv[]) { fileref *fref = clientData; hfsfile *file = fref->file; @@ -546,7 +546,7 @@ int do_copynative(Tcl_Interp *interp, hf * DESCRIPTION: copy an HFS file to another HFS volume */ static -int copynative(Tcl_Interp *interp, volref *srcvref, char *argv[]) +int copynative(Tcl_Interp *interp, volref *srcvref, const char *argv[]) { volref *dstvref; Tcl_CmdInfo info; @@ -654,7 +654,7 @@ int copynative(Tcl_Interp *interp, volre * DESCRIPTION: copy a UNIX file into an HFS volume */ static -int copyin(Tcl_Interp *interp, hfsvol *vol, char *argv[]) +int copyin(Tcl_Interp *interp, hfsvol *vol, const char *argv[]) { cpifunc copyfile; @@ -689,7 +689,7 @@ int copyin(Tcl_Interp *interp, hfsvol *v * DESCRIPTION: copy an HFS file out to a UNIX file */ static -int copyout(Tcl_Interp *interp, hfsvol *vol, char *argv[]) +int copyout(Tcl_Interp *interp, hfsvol *vol, const char *argv[]) { cpofunc copyfile; @@ -812,7 +812,7 @@ void vol_del(ClientData clientData) */ static int vol_cmd(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) + int argc, const char *argv[]) { volref *vref = clientData; hfsvol *vol = vref->vol; @@ -889,7 +889,7 @@ int vol_cmd(ClientData clientData, Tcl_I /* reverse the resulting list */ - if (Tcl_SplitList(interp, interp->result, &listc, &listv) != TCL_OK) + if (Tcl_SplitList(interp, interp->result, &listc, (const char ***) &listv) != TCL_OK) return TCL_ERROR; for (i = 0; i < listc / 2; ++i) @@ -901,7 +901,7 @@ int vol_cmd(ClientData clientData, Tcl_I listv[listc - 1 - i] = tmp; } - result = Tcl_Merge(listc, listv); + result = Tcl_Merge(listc, (const char **)listv); free(listv); Tcl_SetResult(interp, result, TCL_DYNAMIC); @@ -1034,7 +1034,7 @@ int vol_cmd(ClientData clientData, Tcl_I if (hfs_setcwd(vol, vref->cwd) == -1) return error(interp, 0); - if (Tcl_SplitList(interp, argv[2], &listc, &listv) != TCL_OK) + if (Tcl_SplitList(interp, argv[2], &listc, (const char ***)&listv) != TCL_OK) return TCL_ERROR; fargv = hfs_glob(vol, listc, listv, &fargc); @@ -1046,7 +1046,7 @@ int vol_cmd(ClientData clientData, Tcl_I return TCL_ERROR; } - result = Tcl_Merge(fargc, fargv); + result = Tcl_Merge(fargc, (const char **) fargv); free(fargv); Tcl_SetResult(interp, result, TCL_DYNAMIC); @@ -1119,7 +1119,7 @@ int vol_cmd(ClientData clientData, Tcl_I file_ref(interp, vref, fref, file); } else if (strcmp(argv[1], "copy") == 0) - return copynative(interp, vref, argv); + return copynative(interp, vref, (const char **) argv); else if (strcmp(argv[1], "copyin") == 0) { if (hfs_setcwd(vol, vref->cwd) == -1) @@ -1157,7 +1157,7 @@ int vol_cmd(ClientData clientData, Tcl_I */ static int cmd_hfs(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) + int argc, const char *argv[]) { static int id = 0; @@ -1307,7 +1307,7 @@ int cmd_hfs(ClientData clientData, Tcl_I char **listv; unsigned long *badblocks; - if (Tcl_SplitList(interp, argv[5], &listc, &listv) != TCL_OK) + if (Tcl_SplitList(interp, argv[5], &listc, (const char ***)&listv) != TCL_OK) return TCL_ERROR; badblocks = ALLOCX(unsigned long, listc); @@ -1377,7 +1377,7 @@ int cmd_hfs(ClientData clientData, Tcl_I result = cs_latin1(argv[4], 0); else { - Tcl_SetResult(interp, argv[4], TCL_VOLATILE); + Tcl_SetResult(interp, (char *)argv[4], TCL_VOLATILE); return TCL_OK; } @@ -1448,7 +1448,7 @@ int cmd_hfs(ClientData clientData, Tcl_I */ static int cmd_exit(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) + int argc, const char *argv[]) { int status = 0;