Re: CVS commit: src/lib/libc/db/db

2019-10-05 Thread Valery Ushakov
On Sat, Oct 05, 2019 at 18:07:58 +, Valeriy E. Ushakov wrote:

> Module Name:  src
> Committed By: uwe
> Date: Sat Oct  5 18:07:58 UTC 2019
> 
> Modified Files:
>   src/lib/libc/db/db: db.c
> 
> Log Message:
> __dberr: tweak signature to make gcc8 -Wbad-function-cast happy about
> casts in __dbpanic.  Admittedly this is a bit too "cute".
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.19 -r1.20 src/lib/libc/db/db/db.c

Oops, I meant -Wcast-function-type

-uwe


CVS commit: src/lib/libc/db/db

2019-10-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Oct  5 18:07:58 UTC 2019

Modified Files:
src/lib/libc/db/db: db.c

Log Message:
__dberr: tweak signature to make gcc8 -Wbad-function-cast happy about
casts in __dbpanic.  Admittedly this is a bit too "cute".


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/db/db/db.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/db/db

2019-10-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Oct  5 18:07:58 UTC 2019

Modified Files:
src/lib/libc/db/db: db.c

Log Message:
__dberr: tweak signature to make gcc8 -Wbad-function-cast happy about
casts in __dbpanic.  Admittedly this is a bit too "cute".


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/db/db/db.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/db/db/db.c
diff -u src/lib/libc/db/db/db.c:1.19 src/lib/libc/db/db/db.c:1.20
--- src/lib/libc/db/db/db.c:1.19	Sat Oct  5 18:01:52 2019
+++ src/lib/libc/db/db/db.c	Sat Oct  5 18:07:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: db.c,v 1.19 2019/10/05 18:01:52 uwe Exp $	*/
+/*	$NetBSD: db.c,v 1.20 2019/10/05 18:07:58 uwe Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: db.c,v 1.19 2019/10/05 18:01:52 uwe Exp $");
+__RCSID("$NetBSD: db.c,v 1.20 2019/10/05 18:07:58 uwe Exp $");
 
 #include "namespace.h"
 #include 
@@ -45,7 +45,7 @@ __RCSID("$NetBSD: db.c,v 1.19 2019/10/05
 #include 
 
 #include 
-static int __dberr(void);
+static int __dberr(const DB *, ...);
 
 #ifdef __weak_alias
 __weak_alias(dbopen,_dbopen)
@@ -82,7 +82,7 @@ dbopen(const char *fname, int flags, mod
 }
 
 static int
-__dberr(void)
+__dberr(const DB *dbp, ...)
 {
 	return (RET_ERROR);
 }



CVS commit: src/lib/libc/db/db

2019-10-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Oct  5 18:01:52 UTC 2019

Modified Files:
src/lib/libc/db/db: db.c

Log Message:
__dbpanic: use the official DB typedef name in the casts.  They were
copied from the declaration point where it's not yet available.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/db/db/db.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/db/db/db.c
diff -u src/lib/libc/db/db/db.c:1.18 src/lib/libc/db/db/db.c:1.19
--- src/lib/libc/db/db/db.c:1.18	Tue May 19 13:20:52 2015
+++ src/lib/libc/db/db/db.c	Sat Oct  5 18:01:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: db.c,v 1.18 2015/05/19 13:20:52 christos Exp $	*/
+/*	$NetBSD: db.c,v 1.19 2019/10/05 18:01:52 uwe Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: db.c,v 1.18 2015/05/19 13:20:52 christos Exp $");
+__RCSID("$NetBSD: db.c,v 1.19 2019/10/05 18:01:52 uwe Exp $");
 
 #include "namespace.h"
 #include 
@@ -97,10 +97,10 @@ void
 __dbpanic(DB *dbp)
 {
 	/* The only thing that can succeed is a close. */
-	dbp->del = (int (*)(const struct __db *, const DBT*, u_int))__dberr;
-	dbp->fd = (int (*)(const struct __db *))__dberr;
-	dbp->get = (int (*)(const struct __db *, const DBT*, DBT *, u_int))__dberr;
-	dbp->put = (int (*)(const struct __db *, DBT *, const DBT *, u_int))__dberr;
-	dbp->seq = (int (*)(const struct __db *, DBT *, DBT *, u_int))__dberr;
-	dbp->sync = (int (*)(const struct __db *, u_int))__dberr;
+	dbp->del = (int (*)(const DB *, const DBT *, u_int))__dberr;
+	dbp->fd = (int (*)(const DB *))__dberr;
+	dbp->get = (int (*)(const DB *, const DBT *, DBT *, u_int))__dberr;
+	dbp->put = (int (*)(const DB *, DBT *, const DBT *, u_int))__dberr;
+	dbp->seq = (int (*)(const DB *, DBT *, DBT *, u_int))__dberr;
+	dbp->sync = (int (*)(const DB *, u_int))__dberr;
 }



CVS commit: src/lib/libc/db/db

2019-10-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sat Oct  5 18:01:52 UTC 2019

Modified Files:
src/lib/libc/db/db: db.c

Log Message:
__dbpanic: use the official DB typedef name in the casts.  They were
copied from the declaration point where it's not yet available.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/db/db/db.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.