Skip to contentSkip to conversation

libblockdev/tigervnc: fix clang compiling issues

PATCH New Hongxu Jia 1 participant 3 messages Aug 9, 2017

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover libblockdev/tigervnc: fix clang compiling issues

The following changes since commit 0fdf014ffc080b614293dab17713c01afce5c914:

fbida: Fix build with libjpeg-turbo (2017-08-09 02:15:15 +0200)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib hongxu/fix-clang-issue
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/fix-clang-issue

Hongxu Jia (2):
libblockdev: fix a clang compiling issue
tigervnc: fix a clang compiling issue

 .../files/0005-fix-a-clang-compiling-issue.patch   | 111 +++++++++++++++++++++
 .../libblockdev/libblockdev_2.10.bb                |   1 +
 ...005-Remove-INITARGS-from-xserver119.patch.patch |  27 +++++
 .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    |   1 +
 4 files changed, 140 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0005-Remove-INITARGS-from-xserver119.patch.patch
Signature · 1 line
2.8.1
author
#1 lore raw

PATCH 1/2 libblockdev: fix a clang compiling issue

[snip]
../../../git/src/plugins/fs.c:2617:26: error: missing field 'start' initializer [-Werror,-Wmissing-field-initializers]

    PedGeometry geom = {0};
                         ^
../../../git/src/plugins/fs.c:2618:30: error: missing field 'start'
initializer [-Werror,-Wmissing-field-initializers]
    PedGeometry new_geom = {0};

[snip]

Fix typo s/enum libvk_packet_format format/enum libvk_secret secret_type/

---
 .../files/0005-fix-a-clang-compiling-issue.patch   | 111 +++++++++++++++++++++
 .../libblockdev/libblockdev_2.10.bb                |   1 +
 2 files changed, 112 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch
meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch new file +111 -0
new file mode 100644
index 0000000..3818936
@@ -0,0 +1,111 @@
+From 9b4a7a4d0653b627d747e00d6b3ada2990caa1d3 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Wed, 9 Aug 2017 13:57:57 +0800
+Subject: [PATCH] fix a clang compiling issue
+
+[snip]
+../../../git/src/plugins/fs.c:2617:26: error: missing field 'start'
+initializer [-Werror,-Wmissing-field-initializers]
+    PedGeometry geom = {0};
+                         ^
+../../../git/src/plugins/fs.c:2618:30: error: missing field 'start'
+initializer [-Werror,-Wmissing-field-initializers]
+    PedGeometry new_geom = {0};
+[snip]
+
+Fix typo s/enum libvk_packet_format format/enum libvk_secret secret_type/
+
+Upstream-Status: Submitted [https://github.com/storaged-project/libblockdev/pull/266]
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ src/plugins/crypto.c | 6 +++---
+ src/plugins/fs.c     | 4 ++--
+ src/plugins/part.c   | 4 ++--
+ src/utils/exec.c     | 2 +-
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
+index 8fbce4f..7ee7cdc 100644
+--- a/src/plugins/crypto.c
++++ b/src/plugins/crypto.c
+@@ -881,7 +881,7 @@ gboolean bd_crypto_tc_open (const gchar *device, const gchar *name, const guint8
+     gint ret = 0;
+     guint64 progress_id = 0;
+     gchar *msg = NULL;
+-    struct crypt_params_tcrypt params = {0};
++    struct crypt_params_tcrypt params = {NULL,0,NULL,0,NULL,NULL,NULL,0,0};
+ 
+     msg = g_strdup_printf ("Started opening '%s' TrueCrypt/VeraCrypt device", device);
+     progress_id = bd_utils_report_started (msg);
+@@ -999,7 +999,7 @@ static gchar *replace_char (gchar *str, gchar orig, gchar new) {
+     return str;
+ }
+ 
+-static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libvk_ui *ui, enum libvk_packet_format format, const gchar *out_path,
++static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libvk_ui *ui, enum libvk_secret secret_type, const gchar *out_path,
+                                         CERTCertificate *cert, GError **error) {
+     gpointer packet_data = NULL;
+     gsize packet_data_size = 0;
+@@ -1008,7 +1008,7 @@ static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libv
+     gsize bytes_written = 0;
+     GError *tmp_error = NULL;
+ 
+-    packet_data = libvk_volume_create_packet_asymmetric_with_format (volume, &packet_data_size, format, cert,
++    packet_data = libvk_volume_create_packet_asymmetric_with_format (volume, &packet_data_size, secret_type, cert,
+                                                                      ui, LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY, error);
+ 
+     if (!packet_data) {
+diff --git a/src/plugins/fs.c b/src/plugins/fs.c
+index c4b6ac8..647096d 100644
+--- a/src/plugins/fs.c
++++ b/src/plugins/fs.c
+@@ -2614,8 +2614,8 @@ BDFSVfatInfo* bd_fs_vfat_get_info (const gchar *device, GError **error) {
+  */
+ gboolean bd_fs_vfat_resize (const gchar *device, guint64 new_size, GError **error) {
+     PedDevice *ped_dev = NULL;
+-    PedGeometry geom = {0};
+-    PedGeometry new_geom = {0};
++    PedGeometry geom = {NULL, 0, 0, 0};
++    PedGeometry new_geom = {NULL, 0, 0, 0};
+     PedFileSystem *fs = NULL;
+     PedSector start = 0;
+     PedSector length = 0;
+diff --git a/src/plugins/part.c b/src/plugins/part.c
+index 12d2ef7..d277688 100644
+--- a/src/plugins/part.c
++++ b/src/plugins/part.c
+@@ -849,7 +849,7 @@ static PedPartition* add_part_to_disk (PedDevice *dev, PedDisk *disk, BDPartType
+         return NULL;
+     }
+ 
+-    part = ped_partition_new (disk, type, NULL, geom->start, geom->end);
++    part = ped_partition_new (disk, (PedPartitionType)type, NULL, geom->start, geom->end);
+     if (!part) {
+         set_parted_error (error, BD_PART_ERROR_FAIL);
+         g_prefix_error (error, "Failed to create new partition on device '%s'", dev->path);
+@@ -1427,7 +1427,7 @@ gboolean bd_part_set_part_flags (const gchar *disk, const gchar *part, guint64 f
+     PedPartition *ped_part = NULL;
+     const gchar *part_num_str = NULL;
+     gint part_num = 0;
+-    guint64 i = 0;
++    int i = 0;
+     gint status = 0;
+     gboolean ret = FALSE;
+     guint64 progress_id = 0;
+diff --git a/src/utils/exec.c b/src/utils/exec.c
+index 7ac44fd..0a3094c 100644
+--- a/src/utils/exec.c
++++ b/src/utils/exec.c
+@@ -354,7 +354,7 @@ gboolean bd_utils_exec_and_report_progress (const gchar **argv, const BDExtraArg
+     GIOStatus io_status = G_IO_STATUS_NORMAL;
+     guint i = 0;
+     guint8 completion = 0;
+-    GPollFD fds[2] = {{0}, {0}};
++    GPollFD fds[2] = {{0,0,0}, {0,0,0}};
+     gboolean out_done = FALSE;
+     gboolean err_done = FALSE;
+     GString *stdout_data = g_string_new (NULL);
+-- 
+1.8.3.1
+
meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb +1 -0
index 4806dcd..2a92354 100644
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/rhinstaller/libblockdev;branch=master \
            file://0001-fix-configure-and-compile-failures.patch \
            file://0002-remove-python2-support.patch \
            file://0003-remove-dmraid-while-compiling-with-with-dm.patch \
+           file://0005-fix-a-clang-compiling-issue.patch \
 "
 SRC_URI_append_libc-musl = " \
            file://0004-fix-compile-failure-against-musl-C-library.patch \
Signature · 1 line
2.8.1
author
#2 lore raw

PATCH 2/2 tigervnc: fix a clang compiling issue

In reply to Hongxu Jia

Backport a fix from upstream

---
 ...005-Remove-INITARGS-from-xserver119.patch.patch | 27 ++++++++++++++++++++++
 .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0005-Remove-INITARGS-from-xserver119.patch.patch
meta-oe/recipes-graphics/tigervnc/files/0005-Remove-INITARGS-from-xserver119.patch.patch new file +27 -0
new file mode 100644
index 0000000..2f342c6
@@ -0,0 +1,27 @@
+From e4ec992984983ac9107efae1f1cc552007e4229e Mon Sep 17 00:00:00 2001
+From: Vishal Biswas <[email protected]>
+Date: Mon, 8 May 2017 11:06:11 +0530
+Subject: [PATCH] Remove INITARGS from xserver119.patch
+
+Upstream-Status: Backport
+
+---
+ unix/xserver119.patch | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/unix/xserver119.patch b/unix/xserver119.patch
+index 614f104..7adf314 100644
+--- a/unix/xserver119.patch
++++ b/unix/xserver119.patch
+@@ -66,7 +66,7 @@ diff -up xserver/mi/miinitext.c.xserver116-rebased xserver/mi/miinitext.c
+  #include "globals.h"
+  
+ +#ifdef TIGERVNC
+-+extern void vncExtensionInit(INITARGS);
+++extern void vncExtensionInit(void);
+ +#endif
+ +
+  /* The following is only a small first step towards run-time
+-- 
+2.7.4
+
meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb +1 -0
index d15bc9e..469745f 100644
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.8-branch \
            file://0002-do-not-build-tests-sub-directory.patch \
            file://0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch \
            file://0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch \
+           file://0005-Remove-INITARGS-from-xserver119.patch.patch \
 "
 
 # Keep sync with xorg-server in oe-core
Signature · 1 line
2.8.1