databases/pgadmin3 fixes (clang6)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

databases/pgadmin3 fixes (clang6)

Theo Buehler-5
Three things:

It seems upstream changed the server layout and killed the ftp://
protocol, at least it isn't reachable from anywhere for me. I tried to
find an official announcement for this, but gave up after 5 minutes.

Add a static_cast to appease clang6.

There is a newer version 1.22.2 available for pgadmin3, but it's no
longer maintained anyway.  There are lots of warnings that one should
move to pgadmin4. Since I don't use this, I leave this one to pea :)

Index: Makefile
===================================================================
RCS file: /var/cvs/ports/databases/pgadmin3/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile 26 Jul 2017 22:45:16 -0000 1.37
+++ Makefile 15 Apr 2018 19:27:21 -0000
@@ -16,8 +16,7 @@ PERMIT_PACKAGE_CDROM= Yes
 
 WANTLIB= c m pthread ${COMPILER_LIBCXX} crypto z
 
-MASTER_SITES= https://ftp.postgresql.org/pub/pgadmin3/release/v$V/src/ \
- ftp://ftp.postgresql.org/pub/pgadmin3/release/v$V/src/
+MASTER_SITES= https://ftp.postgresql.org/pub/pgadmin/pgadmin3/v$V/src/
 
 LIB_DEPENDS= x11/wxWidgets>=2.8.7 \
  databases/postgresql \
Index: patches/patch-pgadmin_frm_frmEditGrid_cpp
===================================================================
RCS file: patches/patch-pgadmin_frm_frmEditGrid_cpp
diff -N patches/patch-pgadmin_frm_frmEditGrid_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-pgadmin_frm_frmEditGrid_cpp 15 Apr 2018 19:25:26 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: pgadmin/frm/frmEditGrid.cpp
+--- pgadmin/frm/frmEditGrid.cpp.orig
++++ pgadmin/frm/frmEditGrid.cpp
+@@ -2386,7 +2386,7 @@ sqlTable::sqlTable(pgConn *conn, pgQueryThread *_threa
+ columns[i].typlen = colSet->GetLong(wxT("typlen"));
+ columns[i].typmod = colSet->GetLong(wxT("typmod"));
+
+- switch (columns[i].type)
++ switch (static_cast<long>(columns[i].type))
+ {
+ case PGOID_TYPE_BOOL:
+ columns[i].numeric = false;

Reply | Threaded
Open this post in threaded view
|

Re: databases/pgadmin3 fixes (clang6)

Landry Breuil-5
On Sun, Apr 15, 2018 at 09:45:54PM +0200, Theo Buehler wrote:

> Three things:
>
> It seems upstream changed the server layout and killed the ftp://
> protocol, at least it isn't reachable from anywhere for me. I tried to
> find an official announcement for this, but gave up after 5 minutes.
>
> Add a static_cast to appease clang6.
>
> There is a newer version 1.22.2 available for pgadmin3, but it's no
> longer maintained anyway.  There are lots of warnings that one should
> move to pgadmin4. Since I don't use this, I leave this one to pea :)

yeaaah pgadmin4 is a clusterfuck of moving to a new langage/platform and
requiring a shitload of web stuff, so i guess we'll stay with pgadmin3
for a while :)

Reply | Threaded
Open this post in threaded view
|

Re: databases/pgadmin3 fixes (clang6)

Theo Buehler-5
In reply to this post by Theo Buehler-5
On Sun, Apr 15, 2018 at 09:45:54PM +0200, Theo Buehler wrote:

> Three things:
>
> It seems upstream changed the server layout and killed the ftp://
> protocol, at least it isn't reachable from anywhere for me. I tried to
> find an official announcement for this, but gave up after 5 minutes.
>
> Add a static_cast to appease clang6.
>
> There is a newer version 1.22.2 available for pgadmin3, but it's no
> longer maintained anyway.  There are lots of warnings that one should
> move to pgadmin4. Since I don't use this, I leave this one to pea :)

For ease of review, here are the error messages:

frm/frmEditGrid.cpp:2405:10: error: case value evaluates to -42, which cannot be narrowed to type 'OID'
      (aka 'unsigned long') [-Wc++11-narrowing]
                                case PGOID_TYPE_SERIAL:
                                     ^
../pgadmin/include/utils/pgDefs.h:21:45: note: expanded from macro 'PGOID_TYPE_SERIAL'
#define PGOID_TYPE_SERIAL                   -42L
                                            ^
frm/frmEditGrid.cpp:2401:10: error: case value evaluates to -44, which cannot be narrowed to type 'OID'
      (aka 'unsigned long') [-Wc++11-narrowing]
                                case PGOID_TYPE_SERIAL2:
                                     ^
../pgadmin/include/utils/pgDefs.h:23:45: note: expanded from macro 'PGOID_TYPE_SERIAL2'
#define PGOID_TYPE_SERIAL2                  -44L
                                            ^
frm/frmEditGrid.cpp:2397:10: error: case value evaluates to -43, which cannot be narrowed to type 'OID'
      (aka 'unsigned long') [-Wc++11-narrowing]
                                case PGOID_TYPE_SERIAL8:
                                     ^
../pgadmin/include/utils/pgDefs.h:22:45: note: expanded from macro 'PGOID_TYPE_SERIAL8'
#define PGOID_TYPE_SERIAL8                  -43L


Index: Makefile
===================================================================
RCS file: /var/cvs/ports/databases/pgadmin3/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile 26 Jul 2017 22:45:16 -0000 1.37
+++ Makefile 15 Apr 2018 19:27:21 -0000
@@ -16,8 +16,7 @@ PERMIT_PACKAGE_CDROM= Yes
 
 WANTLIB= c m pthread ${COMPILER_LIBCXX} crypto z
 
-MASTER_SITES= https://ftp.postgresql.org/pub/pgadmin3/release/v$V/src/ \
- ftp://ftp.postgresql.org/pub/pgadmin3/release/v$V/src/
+MASTER_SITES= https://ftp.postgresql.org/pub/pgadmin/pgadmin3/v$V/src/
 
 LIB_DEPENDS= x11/wxWidgets>=2.8.7 \
  databases/postgresql \
Index: patches/patch-pgadmin_frm_frmEditGrid_cpp
===================================================================
RCS file: patches/patch-pgadmin_frm_frmEditGrid_cpp
diff -N patches/patch-pgadmin_frm_frmEditGrid_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-pgadmin_frm_frmEditGrid_cpp 16 Apr 2018 08:31:24 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: pgadmin/frm/frmEditGrid.cpp
+--- pgadmin/frm/frmEditGrid.cpp.orig
++++ pgadmin/frm/frmEditGrid.cpp
+@@ -2386,7 +2386,7 @@ sqlTable::sqlTable(pgConn *conn, pgQueryThread *_threa
+ columns[i].typlen = colSet->GetLong(wxT("typlen"));
+ columns[i].typmod = colSet->GetLong(wxT("typmod"));
+
+- switch (columns[i].type)
++ switch (static_cast<long>(columns[i].type))
+ {
+ case PGOID_TYPE_BOOL:
+ columns[i].numeric = false;