Compare commits
No commits in common. 'c8' and 'c9' have entirely different histories.
@ -1 +1 @@
|
|||||||
SOURCES/graphite2-1.3.10.tgz
|
SOURCES/graphite2-1.3.14.tgz
|
||||||
|
@ -1 +1 @@
|
|||||||
668f3bce96fc02d90ea875b401ed36b2e8957d2f SOURCES/graphite2-1.3.10.tgz
|
bb0d0127f0afc10d7cc993a559bebcba8940d630 SOURCES/graphite2-1.3.14.tgz
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
From 940d82895512737db2ad6b7698d8d7d140356a7e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tim Eves <tim_eves@sil.org>
|
|
||||||
Date: Thu, 16 Nov 2017 17:12:32 +0700
|
|
||||||
Subject: [PATCH] Fix memory leaks on realloc failure
|
|
||||||
|
|
||||||
Make sure the original buffer is cleaned up if realoc fails.
|
|
||||||
---
|
|
||||||
src/Code.cpp | 6 +++++-
|
|
||||||
src/Pass.cpp | 3 ++-
|
|
||||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Code.cpp b/src/Code.cpp
|
|
||||||
index 92ba923..a5ec04e 100644
|
|
||||||
--- a/src/Code.cpp
|
|
||||||
+++ b/src/Code.cpp
|
|
||||||
@@ -219,7 +219,11 @@ Machine::Code::Code(bool is_constraint, const byte * bytecode_begin, const byte
|
|
||||||
if (_out)
|
|
||||||
*_out += total_sz;
|
|
||||||
else
|
|
||||||
- _code = static_cast<instr *>(realloc(_code, total_sz));
|
|
||||||
+ {
|
|
||||||
+ instr * const old_code = _code;
|
|
||||||
+ _code = static_cast<instr *>(realloc(_code, total_sz));
|
|
||||||
+ if (!_code) free(old_code);
|
|
||||||
+ }
|
|
||||||
_data = reinterpret_cast<byte *>(_code + (_instr_count+1));
|
|
||||||
|
|
||||||
if (!_code)
|
|
||||||
diff --git a/src/Pass.cpp b/src/Pass.cpp
|
|
||||||
index ae0e9df..1d45bf8 100644
|
|
||||||
--- a/src/Pass.cpp
|
|
||||||
+++ b/src/Pass.cpp
|
|
||||||
@@ -273,7 +273,9 @@ bool Pass::readRules(const byte * rule_map, const size_t num_entries,
|
|
||||||
byte * moved_progs = static_cast<byte *>(realloc(m_progs, prog_pool_free - m_progs));
|
|
||||||
if (e.test(!moved_progs, E_OUTOFMEM))
|
|
||||||
{
|
|
||||||
- if (prog_pool_free - m_progs == 0) m_progs = 0;
|
|
||||||
+ free(m_progs);
|
|
||||||
+ m_progs = 0;
|
|
||||||
+ // coverity[leaked_storage : FALSE] - can only get to here if moved_progs is nullptr
|
|
||||||
return face.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
@ -1,268 +0,0 @@
|
|||||||
From cf872f3053dd5b0af7b3b4f583bcce9d5bb953c2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tim Eves <tim_eves@sil.org>
|
|
||||||
Date: Wed, 5 Jul 2017 21:27:03 +0700
|
|
||||||
Subject: [PATCH] Fix stricter gcc warnings
|
|
||||||
|
|
||||||
Also get rid of auto_ptr from comparerenderer
|
|
||||||
---
|
|
||||||
src/gr_logging.cpp | 2 +-
|
|
||||||
tests/comparerenderer/RenderedLine.h | 14 ++++++--------
|
|
||||||
tests/comparerenderer/Gr2Renderer.h | 166 ++++++++++++++--------------
|
|
||||||
|
|
||||||
diff --git a/src/gr_logging.cpp b/src/gr_logging.cpp
|
|
||||||
index 3e453ba..b75a394 100644
|
|
||||||
--- a/src/gr_logging.cpp
|
|
||||||
+++ b/src/gr_logging.cpp
|
|
||||||
@@ -214,7 +214,7 @@ json & graphite2::operator << (json & j, const dslot & ds) throw()
|
|
||||||
j << "user" << json::flat << json::array;
|
|
||||||
for (int n = 0; n!= seg.numAttrs(); ++n)
|
|
||||||
j << s.userAttrs()[n];
|
|
||||||
- j << json::close;
|
|
||||||
+ j << json::close;
|
|
||||||
if (s.firstChild())
|
|
||||||
{
|
|
||||||
j << "children" << json::flat << json::array;
|
|
||||||
|
|
||||||
diff --git a/tests/comparerenderer/RenderedLine.h b/tests/comparerenderer/RenderedLine.h
|
|
||||||
index fb8398d..649fb63 100644
|
|
||||||
--- a/tests/comparerenderer/RenderedLine.h
|
|
||||||
+++ b/tests/comparerenderer/RenderedLine.h
|
|
||||||
@@ -99,9 +99,9 @@ class RenderedLine
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
RenderedLine()
|
|
||||||
- : m_text(NULL), m_numGlyphs(0), m_advance(0), m_glyphs(NULL)
|
|
||||||
+ : m_numGlyphs(0), m_advance(0), m_glyphs(NULL)
|
|
||||||
{}
|
|
||||||
- RenderedLine(std::string *text, size_t numGlyphs, float adv = 0.0f)
|
|
||||||
+ RenderedLine(const std::string & text, size_t numGlyphs, float adv = 0.0f)
|
|
||||||
: m_text(text), m_numGlyphs(numGlyphs), m_advance(adv), m_glyphs(new GlyphInfo[numGlyphs])
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -109,12 +109,11 @@ class RenderedLine
|
|
||||||
{
|
|
||||||
delete [] m_glyphs;
|
|
||||||
m_glyphs = NULL;
|
|
||||||
- delete m_text;
|
|
||||||
}
|
|
||||||
void setAdvance(float newAdv) { m_advance = newAdv; }
|
|
||||||
void dump(FILE * f)
|
|
||||||
{
|
|
||||||
- fprintf(f, "{\"%s\" : [", m_text->c_str());
|
|
||||||
+ fprintf(f, "{\"%s\" : [", m_text.c_str());
|
|
||||||
for (size_t i = 0; i < m_numGlyphs; i++)
|
|
||||||
{
|
|
||||||
//fprintf(f, "%2u", (unsigned int)i);
|
|
||||||
@@ -157,9 +156,8 @@ class RenderedLine
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
- size_t m_numGlyphs;
|
|
||||||
- float m_advance;
|
|
||||||
+ size_t m_numGlyphs;
|
|
||||||
+ float m_advance;
|
|
||||||
GlyphInfo * m_glyphs;
|
|
||||||
- std::string * m_text;
|
|
||||||
+ std::string m_text;
|
|
||||||
};
|
|
||||||
-
|
|
||||||
--
|
|
||||||
diff --git a/tests/comparerenderer/Gr2Renderer.h b/tests/comparerenderer/Gr2Renderer.h
|
|
||||||
index dfce31b..8aaeddc 100644
|
|
||||||
--- a/tests/comparerenderer/Gr2Renderer.h
|
|
||||||
+++ b/tests/comparerenderer/Gr2Renderer.h
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <new>
|
|
||||||
+#include <iostream>
|
|
||||||
#include <memory>
|
|
||||||
#include <string>
|
|
||||||
#include "Renderer.h"
|
|
||||||
@@ -30,99 +31,102 @@
|
|
||||||
#include <graphite2/Segment.h>
|
|
||||||
#include <graphite2/Log.h>
|
|
||||||
|
|
||||||
-class Gr2Face : private std::auto_ptr<gr_face>
|
|
||||||
+
|
|
||||||
+using gr_face_ptr = std::unique_ptr<gr_face, decltype(&gr_face_destroy)>;
|
|
||||||
+using gr_font_ptr = std::unique_ptr<gr_font, decltype(&gr_font_destroy)>;
|
|
||||||
+using gr_feature_val_ptr = std::unique_ptr<gr_feature_val, decltype(&gr_featureval_destroy)>;
|
|
||||||
+using gr_segment_ptr = std::unique_ptr<gr_segment, decltype(&gr_seg_destroy)>;
|
|
||||||
+
|
|
||||||
+class Gr2Face : public gr_face_ptr
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Gr2Face(const char * fontFile, const std::string & logPath, const bool demand_load)
|
|
||||||
- : std::auto_ptr<gr_face>(gr_make_file_face(fontFile, !demand_load ? gr_face_preloadGlyphs : gr_face_default))
|
|
||||||
+ : gr_face_ptr(gr_make_file_face(fontFile,
|
|
||||||
+ !demand_load ? gr_face_preloadGlyphs : gr_face_default),
|
|
||||||
+ &gr_face_destroy)
|
|
||||||
{
|
|
||||||
- if (!get()) return;
|
|
||||||
-
|
|
||||||
- if (logPath.size()) gr_start_logging(get(), logPath.c_str());
|
|
||||||
+ if (*this && logPath.size()) gr_start_logging(get(), logPath.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
+ Gr2Face(Gr2Face && f): gr_face_ptr(std::move(f)) {}
|
|
||||||
+
|
|
||||||
~Gr2Face() throw()
|
|
||||||
{
|
|
||||||
- gr_stop_logging(get());
|
|
||||||
- gr_face_destroy(get());
|
|
||||||
- release();
|
|
||||||
+ gr_stop_logging(get());
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- operator bool () const { return get() != 0; }
|
|
||||||
- operator gr_face* () const { return get(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class Gr2Renderer : public Renderer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
- Gr2Renderer(Gr2Face & face, int fontSize, int textDir, FeatureParser * features)
|
|
||||||
- : m_rtl(textDir),
|
|
||||||
- m_grFace(face),
|
|
||||||
- m_grFont(0),
|
|
||||||
- m_grFeatures(0)
|
|
||||||
- {
|
|
||||||
- if (m_grFace)
|
|
||||||
- {
|
|
||||||
- m_grFont = gr_make_font(static_cast<float>(fontSize), m_grFace);
|
|
||||||
- if (features)
|
|
||||||
- {
|
|
||||||
- m_grFeatures = gr_face_featureval_for_lang(m_grFace, features->langId());
|
|
||||||
- for (size_t i = 0; i < features->featureCount(); i++)
|
|
||||||
- {
|
|
||||||
- const gr_feature_ref * ref = gr_face_find_fref(m_grFace, features->featureId(i));
|
|
||||||
- if (ref)
|
|
||||||
- gr_fref_set_feature_value(ref, features->featureSValue(i), m_grFeatures);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- {
|
|
||||||
- m_grFeatures = gr_face_featureval_for_lang(m_grFace, 0);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- m_name = "graphite2";
|
|
||||||
- }
|
|
||||||
- virtual ~Gr2Renderer()
|
|
||||||
- {
|
|
||||||
- gr_featureval_destroy(m_grFeatures);
|
|
||||||
- gr_font_destroy(m_grFont);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- virtual void renderText(const char * utf8, size_t length, RenderedLine * result, FILE *log)
|
|
||||||
- {
|
|
||||||
- const void * pError = NULL;
|
|
||||||
- if (!m_grFace)
|
|
||||||
- {
|
|
||||||
- new(result) RenderedLine();
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- size_t numCodePoints = gr_count_unicode_characters(gr_utf8,
|
|
||||||
- reinterpret_cast<const void*>(utf8), reinterpret_cast<const void*>(utf8 + length), &pError);
|
|
||||||
- if (pError)
|
|
||||||
- fprintf(stderr, "Invalid Unicode pos %d\n", static_cast<int>(reinterpret_cast<const char*>(pError) - utf8));
|
|
||||||
- gr_segment* pSeg = gr_make_seg(m_grFont, m_grFace, 0u, m_grFeatures, gr_utf8, utf8, numCodePoints, m_rtl ? 1 : 0);
|
|
||||||
- if (!pSeg)
|
|
||||||
- {
|
|
||||||
- fprintf(stderr, "Failed to create segment\n");
|
|
||||||
- new(result) RenderedLine(0, .0f);
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- std::string *s = new std::string(utf8, length);
|
|
||||||
- RenderedLine * renderedLine = new(result) RenderedLine(s, gr_seg_n_slots(pSeg),
|
|
||||||
- gr_seg_advance_X(pSeg));
|
|
||||||
- int i = 0;
|
|
||||||
- for (const gr_slot* s = gr_seg_first_slot(pSeg); s;
|
|
||||||
- s = gr_slot_next_in_segment(s), ++i)
|
|
||||||
- (*renderedLine)[i].set(gr_slot_gid(s), gr_slot_origin_X(s),
|
|
||||||
- gr_slot_origin_Y(s), gr_slot_before(s),
|
|
||||||
- gr_slot_after(s));
|
|
||||||
- gr_seg_destroy(pSeg);
|
|
||||||
- }
|
|
||||||
- virtual const char * name() const { return m_name; }
|
|
||||||
-private:
|
|
||||||
- int m_rtl;
|
|
||||||
- Gr2Face m_grFace;
|
|
||||||
- gr_font * m_grFont;
|
|
||||||
- gr_feature_val * m_grFeatures;
|
|
||||||
- const char * m_name;
|
|
||||||
-};
|
|
||||||
+ Gr2Renderer(Gr2Face & face, int fontSize, bool rtl, FeatureParser * features)
|
|
||||||
+ : m_rtl(rtl),
|
|
||||||
+ m_grFace(std::move(face)),
|
|
||||||
+ m_grFont(nullptr, &gr_font_destroy),
|
|
||||||
+ m_grFeatures(nullptr, gr_featureval_destroy),
|
|
||||||
+ m_name("graphite2")
|
|
||||||
+ {
|
|
||||||
+ if (!m_grFace)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ m_grFont.reset(gr_make_font(static_cast<float>(fontSize), m_grFace.get()));
|
|
||||||
+ if (features)
|
|
||||||
+ {
|
|
||||||
+ m_grFeatures.reset(gr_face_featureval_for_lang(m_grFace.get(), features->langId()));
|
|
||||||
+ for (size_t i = 0; i < features->featureCount(); i++)
|
|
||||||
+ {
|
|
||||||
+ const gr_feature_ref * ref = gr_face_find_fref(m_grFace.get(), features->featureId(i));
|
|
||||||
+ if (ref)
|
|
||||||
+ gr_fref_set_feature_value(ref, features->featureSValue(i), m_grFeatures.get());
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ m_grFeatures.reset(gr_face_featureval_for_lang(m_grFace.get(), 0));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ virtual void renderText(const char * utf8, size_t length, RenderedLine * result, FILE *log)
|
|
||||||
+ {
|
|
||||||
+ const void * pError = NULL;
|
|
||||||
+ if (!m_grFace)
|
|
||||||
+ {
|
|
||||||
+ new (result) RenderedLine();
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ size_t numCodePoints = gr_count_unicode_characters(gr_utf8, utf8, utf8 + length, &pError);
|
|
||||||
+ if (pError)
|
|
||||||
+ std::cerr << "Invalid Unicode pos" << int(static_cast<const char*>(pError) - utf8) << std::endl;
|
|
||||||
+
|
|
||||||
+ gr_segment_ptr pSeg = gr_segment_ptr(
|
|
||||||
+ gr_make_seg(m_grFont.get(), m_grFace.get(), 0u, m_grFeatures.get(),
|
|
||||||
+ gr_utf8, utf8, numCodePoints, m_rtl),
|
|
||||||
+ &gr_seg_destroy);
|
|
||||||
+
|
|
||||||
+ if (!pSeg)
|
|
||||||
+ {
|
|
||||||
+ std::cerr << "Failed to create segment" << std::endl;
|
|
||||||
+ new (result) RenderedLine(0, .0f);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ RenderedLine * renderedLine = new (result) RenderedLine(std::string(utf8, length), gr_seg_n_slots(pSeg.get()),
|
|
||||||
+ gr_seg_advance_X(pSeg.get()));
|
|
||||||
+ const gr_slot * s = gr_seg_first_slot(pSeg.get());
|
|
||||||
+ for (int i = 0; s; ++i)
|
|
||||||
+ {
|
|
||||||
+ (*renderedLine)[i].set(gr_slot_gid(s), gr_slot_origin_X(s),
|
|
||||||
+ gr_slot_origin_Y(s), gr_slot_before(s),
|
|
||||||
+ gr_slot_after(s));
|
|
||||||
+ s = gr_slot_next_in_segment(s);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ virtual const char * name() const { return m_name; }
|
|
||||||
+ private:
|
|
||||||
+ Gr2Face m_grFace;
|
|
||||||
+ const char * const m_name;
|
|
||||||
+ bool m_rtl;
|
|
||||||
+ gr_font_ptr m_grFont;
|
|
||||||
+ gr_feature_val_ptr m_grFeatures;
|
|
||||||
+ };
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From cf661dac92704ed738252f29b0925f15aee85609 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Thu, 19 Jul 2018 17:01:38 +0100
|
|
||||||
Subject: [PATCH] Related: rhbz#1602527 CTOR_DTOR_LEAK coverity warning
|
|
||||||
|
|
||||||
tests/featuremap/featuremaptest.cpp:180: alloc_new: Allocating memory by calling "new char[font_size]".
|
|
||||||
tests/featuremap/featuremaptest.cpp:180: var_assign: Assigning: "this->_header" = "new char[font_size]".
|
|
||||||
tests/featuremap/featuremaptest.cpp:180: ctor_dtor_leak: The constructor allocates field "_header" of "face_handle" but there is no destructor.
|
|
||||||
---
|
|
||||||
tests/featuremap/featuremaptest.cpp | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tests/featuremap/featuremaptest.cpp b/tests/featuremap/featuremaptest.cpp
|
|
||||||
index afbf339..901ea39 100644
|
|
||||||
--- a/tests/featuremap/featuremaptest.cpp
|
|
||||||
+++ b/tests/featuremap/featuremaptest.cpp
|
|
||||||
@@ -187,6 +187,11 @@ public:
|
|
||||||
_dir = _header + dir_off;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ ~face_handle()
|
|
||||||
+ {
|
|
||||||
+ delete [] _header;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
void replace_table(const TtfUtil::Tag name, const void * const data, size_t len) throw() {
|
|
||||||
_tables[name] = std::make_pair(data, len);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From b94a1ab2983293cb666b5dca8012b993eb4947b5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Mon, 23 Jul 2018 14:54:58 +0100
|
|
||||||
Subject: [PATCH] Related: rhbz#1602527 add comment to silence leaked_storage
|
|
||||||
for 'glyphs'
|
|
||||||
|
|
||||||
---
|
|
||||||
src/GlyphCache.cpp | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/GlyphCache.cpp b/src/GlyphCache.cpp
|
|
||||||
index 6d050ce..282bdc1 100644
|
|
||||||
--- a/src/GlyphCache.cpp
|
|
||||||
+++ b/src/GlyphCache.cpp
|
|
||||||
@@ -164,6 +164,7 @@ GlyphCache::GlyphCache(const Face & face, const uint32 face_options)
|
|
||||||
}
|
|
||||||
delete _glyph_loader;
|
|
||||||
_glyph_loader = 0;
|
|
||||||
+ // coverity[leaked_storage : FALSE] - calling read_glyph on index 0 saved glyphs
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_glyphs && glyph(0) == 0)
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 0f04e6cbbb5ecda6356a5a1756f108154945cbed Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Mon, 23 Jul 2018 12:02:13 +0100
|
|
||||||
Subject: [PATCH] Related: rhbz#1602527 resourceLeak cppcheck warning
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/comparerenderer/CompareRenderer.cpp | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/tests/comparerenderer/CompareRenderer.cpp b/tests/comparerenderer/CompareRenderer.cpp
|
|
||||||
index 31b185a..a848e65 100644
|
|
||||||
--- a/tests/comparerenderer/CompareRenderer.cpp
|
|
||||||
+++ b/tests/comparerenderer/CompareRenderer.cpp
|
|
||||||
@@ -371,6 +371,7 @@ int main(int argc, char ** argv)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Please specify at least 1 renderer\n");
|
|
||||||
showOptions();
|
|
||||||
+ if (rendererOptions[OptLogFile].exists()) fclose(log);
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 168cc02731ddfc7c429fbe4af616000011e55789 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Mon, 23 Jul 2018 16:30:40 +0100
|
|
||||||
Subject: [PATCH] WaE: misleading-indentation
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/endian/endiantest.cpp | 5 ++---
|
|
||||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/endian/endiantest.cpp b/tests/endian/endiantest.cpp
|
|
||||||
index b4fa196..ddc55ad 100644
|
|
||||||
--- a/tests/endian/endiantest.cpp
|
|
||||||
+++ b/tests/endian/endiantest.cpp
|
|
||||||
@@ -138,9 +138,8 @@
|
|
||||||
const size_t rounds = 1UL << atoi(argv[1]);
|
|
||||||
int r = 0;
|
|
||||||
|
|
||||||
- if (!test_swaps<uint64, uint32, uint16, uint8>()
|
|
||||||
- || !test_swaps<int64, int32, int16, int8>())
|
|
||||||
- return 5;
|
|
||||||
+ if (!test_swaps<uint64, uint32, uint16, uint8>() || !test_swaps<int64, int32, int16, int8>())
|
|
||||||
+ return 5;
|
|
||||||
|
|
||||||
if (r == 0) r = test_reads<uint64, uint32, uint16, uint8>(rounds);
|
|
||||||
if (r == 0) r = test_reads<int64, int32, int16, int8>(rounds);
|
|
@ -1,16 +1,16 @@
|
|||||||
--- graphite2-1.2.0/src/CMakeLists.txt.orig 2012-11-09 17:48:04.908391335 +0800
|
--- graphite2-1.2.0/src/CMakeLists.txt.orig 2012-11-09 17:48:04.908391335 +0800
|
||||||
+++ graphite2-1.2.0/src/CMakeLists.txt 2012-11-09 17:48:48.647102280 +0800
|
+++ graphite2-1.2.0/src/CMakeLists.txt 2012-11-09 17:48:48.647102280 +0800
|
||||||
@@ -118,11 +118,7 @@
|
@@ -120,11 +120,7 @@
|
||||||
if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
|
if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
|
||||||
target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32)
|
target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32)
|
||||||
else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
|
else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
|
||||||
- if (GRAPHITE2_ASAN)
|
- if (GRAPHITE2_SANITIZERS)
|
||||||
- target_link_libraries(graphite2 c gcc_s)
|
- target_link_libraries(graphite2 c gcc_s)
|
||||||
- else (GRAPHITE2_ASAN)
|
- else ()
|
||||||
- target_link_libraries(graphite2 c gcc)
|
- target_link_libraries(graphite2 c gcc)
|
||||||
- endif (GRAPHITE2_ASAN)
|
- endif ()
|
||||||
+ target_link_libraries(graphite2 c gcc_s)
|
+ target_link_libraries(graphite2 c gcc_s)
|
||||||
include(Graphite)
|
endif()
|
||||||
nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
|
include(Graphite)
|
||||||
endif (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
|
if (BUILD_SHARED_LIBS)
|
||||||
|
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
diff -ru graphite2-1.3.10.orig/src/CMakeLists.txt graphite2-1.3.10/src/CMakeLists.txt
|
|
||||||
--- graphite2-1.3.10.orig/src/CMakeLists.txt 2018-08-31 09:18:49.348599342 +0100
|
|
||||||
+++ graphite2-1.3.10/src/CMakeLists.txt 2018-08-31 09:18:51.906618095 +0100
|
|
||||||
@@ -107,9 +107,9 @@
|
|
||||||
LT_VERSION_AGE ${GRAPHITE_API_AGE})
|
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
||||||
- set_target_properties(graphite2 PROPERTIES
|
|
||||||
- COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
|
|
||||||
- LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
|
|
||||||
+ set_target_properties(graphite2 PROPERTIES
|
|
||||||
+ COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
|
|
||||||
+ LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
|
|
||||||
LINKER_LANGUAGE C)
|
|
||||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
|
|
||||||
add_definitions(-mfpmath=sse -msse2)
|
|
||||||
@@ -137,9 +137,9 @@
|
|
||||||
endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
|
||||||
- set_target_properties(graphite2 PROPERTIES
|
|
||||||
- COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector -mfpmath=sse -msse2"
|
|
||||||
- LINK_FLAGS "-nodefaultlibs"
|
|
||||||
+ set_target_properties(graphite2 PROPERTIES
|
|
||||||
+ COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -mfpmath=sse -msse2"
|
|
||||||
+ LINK_FLAGS "-nodefaultlibs"
|
|
||||||
LINKER_LANGUAGE C)
|
|
||||||
target_link_libraries(graphite2 c)
|
|
||||||
include(Graphite)
|
|
||||||
diff -ru graphite2-1.3.10.orig/tests/CMakeLists.txt graphite2-1.3.10/tests/CMakeLists.txt
|
|
||||||
--- graphite2-1.3.10.orig/tests/CMakeLists.txt 2018-08-31 09:18:49.351599365 +0100
|
|
||||||
+++ graphite2-1.3.10/tests/CMakeLists.txt 2018-08-31 09:19:10.318753067 +0100
|
|
||||||
@@ -47,12 +47,12 @@
|
|
||||||
else (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
||||||
# don't -D GRAPHITE2_STATIC so that tests can see the API symbols in the static library
|
|
||||||
set_target_properties(graphite2-base PROPERTIES
|
|
||||||
- COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions -fno-stack-protector"
|
|
||||||
+ COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions"
|
|
||||||
COMPILE_DEFINITIONS "GRAPHITE2_NTRACING"
|
|
||||||
LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
|
|
||||||
LINKER_LANGUAGE C)
|
|
||||||
set_target_properties(graphite2-segcache PROPERTIES
|
|
||||||
- COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions -fno-stack-protector"
|
|
||||||
+ COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions"
|
|
||||||
COMPILE_DEFINITIONS "GRAPHITE2_NTRACING${TELEMETRY}"
|
|
||||||
LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
|
|
||||||
LINKER_LANGUAGE C)
|
|
Loading…
Reference in new issue