git: da111dd6c7a8 - main - russian/d1489: silence warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Sep 2026 16:35:39 UTC
The branch main has been updated by eugen:
URL: https://cgit.FreeBSD.org/ports/commit/?id=da111dd6c7a8f0cd84bc7ac1a6925766cc3157b0
commit da111dd6c7a8f0cd84bc7ac1a6925766cc3157b0
Author: Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2026-09-24 16:29:04 +0000
Commit: Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2026-09-24 16:35:29 +0000
russian/d1489: silence warnings
Make stock Clang compile this ancient code without warnings.
PORTREVISION not bumped intentionally.
---
russian/d1489/Makefile | 1 +
russian/d1489/files/patch-a2kfcnv.c | 28 +++++++++++++++
russian/d1489/files/patch-todos.c | 71 +++++++++++++++++++++++++++++++++++++
3 files changed, 100 insertions(+)
diff --git a/russian/d1489/Makefile b/russian/d1489/Makefile
index b30f33a7b0cc..8e41cbdaa831 100644
--- a/russian/d1489/Makefile
+++ b/russian/d1489/Makefile
@@ -14,6 +14,7 @@ LICENSE= BSD2CLAUSE
USES= tar:tgz
+CFLAGS+= -ansi -Wno-invalid-source-encoding
MAKE_ARGS= PREFIX=${PREFIX} STAGEDIR=${STAGEDIR}
PLIST_FILES= bin/a2kfcnv bin/fromdos bin/todos bin/fromwin bin/towin
diff --git a/russian/d1489/files/patch-a2kfcnv.c b/russian/d1489/files/patch-a2kfcnv.c
new file mode 100644
index 000000000000..5c32141819c2
--- /dev/null
+++ b/russian/d1489/files/patch-a2kfcnv.c
@@ -0,0 +1,28 @@
+--- a2kfcnv.c.orig 1998-12-21 23:51:14 UTC
++++ a2kfcnv.c
+@@ -46,14 +46,13 @@ unsigned char font[256][MAXHEIGHT];
+
+ #include "koi82alt.h"
+
+-logo()
++static void logo(void)
+ {
+ fprintf(stderr, "Freeware a2kfcnv v1.1\n\
+ Copyright (C) 1993-1994 by Andrew A. Chernov, Moscow, Russia\n");
+ }
+
+-main(ac, av)
+-char *av[];
++int main(int ac, char *av[])
+ {
+ register i, j, n;
+ FILE *af, *kf;
+@@ -121,7 +120,7 @@ usage:
+ }
+ size /= 256;
+ if (size > MAXHEIGHT) {
+- fprintf(stderr, "%s: %ld - font height too big, maximum %ld\n",
++ fprintf(stderr, "%s: %ld - font height too big, maximum %d\n",
+ av[1], size, MAXHEIGHT);
+ return 1;
+ }
diff --git a/russian/d1489/files/patch-todos.c b/russian/d1489/files/patch-todos.c
new file mode 100644
index 000000000000..bb6b0f3a6624
--- /dev/null
+++ b/russian/d1489/files/patch-todos.c
@@ -0,0 +1,71 @@
+--- todos.c.orig 2003-01-02 20:17:18 UTC
++++ todos.c
+@@ -31,6 +31,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+@@ -55,8 +56,11 @@ char outbuf[NEEDSIZ];
+ char outbuf[NEEDSIZ];
+ #endif
+
+-extern char *mktemp();
+-int RENAME(), decode();
++/* extern char *mktemp(); */
++static char* basename(char *name);
++static int decode(FILE *fin, FILE *fout);
++static void logo(char *name);
++static int RENAME(char *oldname, char *newname);
+
+ #include "alt2koi8.h"
+ #include "koi82alt.h"
+@@ -70,15 +74,13 @@ char win[] = "cp1251(win)";
+ char Unix[] = "koi8-r(unix)";
+ char win[] = "cp1251(win)";
+
+-logo(name)
+-char *name;
++static void logo(char *name)
+ {
+ fprintf(stderr, "Freeware %s v1.5\n\
+ Copyright (C) 1993-2003 by Andrey A. Chernov, Moscow, Russia\n", name);
+ }
+
+-char *basename(name)
+-char *name;
++static char *basename(char *name)
+ {
+ char *p;
+
+@@ -314,8 +316,7 @@ usage:
+ return 0;
+ }
+
+-decode(fin, fout)
+-FILE *fin, *fout;
++static int decode(FILE *fin, FILE *fout)
+ {
+ register int c, SeeNext;
+ static char cc[2];
+@@ -341,7 +342,7 @@ FILE *fin, *fout;
+ s = "";
+ goto single;
+ }
+- while (c = (unsigned char) *s++) {
++ while ((c = (unsigned char) *s++)) {
+ single:
+ if (!binary) {
+ if (SeeNext) {
+@@ -375,8 +376,7 @@ char *old, *new;
+ }
+ #endif
+
+-int RENAME(oldname, newname)
+-char *oldname, *newname;
++static int RENAME(char *oldname, char *newname)
+ {
+ FILE *of, *nf;
+ int c;