summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Puskas <zoltan@sinustrom.info>2019-12-19 02:26:24 -0800
committerAlexey Shvetsov <alexxy@gentoo.org>2020-05-14 13:34:07 +0300
commit0eea69141f8a758b5205b69a1495332aff9e78e9 (patch)
tree4db6b92795963ed5deb5aaf6e5d9e0b543120526 /sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch
parentdev-python/bpython: Remove old (diff)
downloadgentoo-0eea69141f8a758b5205b69a1495332aff9e78e9.tar.gz
gentoo-0eea69141f8a758b5205b69a1495332aff9e78e9.tar.bz2
gentoo-0eea69141f8a758b5205b69a1495332aff9e78e9.zip
sci-electronics/kicad: Fix build failure and QA
Fix recent build failure in KiCAD. Also apply backported patches from upstream to address QA issues that remained since introducing this version of the ebuild. Package-Manager: Portage-2.3.80, Repoman-2.3.19 Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info> Closes: https://bugs.gentoo.org/682480 Closes: https://bugs.gentoo.org/722288 Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Diffstat (limited to 'sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch')
-rw-r--r--sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch b/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch
new file mode 100644
index 000000000000..b01a6b7d79f6
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch
@@ -0,0 +1,25 @@
+diff --git a/eeschema/dialogs/dialog_spice_model.cpp b/eeschema/dialogs/dialog_spice_model.cpp
+index b265e2363..eb1187d86 100644
+--- a/eeschema/dialogs/dialog_spice_model.cpp
++++ b/eeschema/dialogs/dialog_spice_model.cpp
+@@ -34,6 +34,7 @@
+ #include <wx/wupdlock.h>
+
+ #include <cctype>
++#include <cstring>
+
+ // Helper function to shorten conditions
+ static bool empty( const wxTextCtrl* aCtrl )
+@@ -804,9 +804,11 @@ bool DIALOG_SPICE_MODEL::addPwlValue( const wxString& aTime, const wxString& aVa
+ float timeF;
+ m_pwlTime->GetValue().ToDouble( &timeD );
+ timeF = timeD;
++ long data;
++ std::memcpy( &data, &timeF, sizeof( timeF ) );
+
+ // Store the time value, so the entries can be sorted
+- m_pwlValList->SetItemData( idx, *reinterpret_cast<long*>( &timeF ) );
++ m_pwlValList->SetItemData( idx, data );
+
+ // Sort items by timestamp
+ m_pwlValList->SortItems( comparePwlValues, -1 );