Add -Werror=unused-function check to Travis (#832)

This commit is contained in:
Ebrahim Byagowi 2018-02-24 14:17:54 +03:30 committed by GitHub
parent 1ab16f4556
commit cd28eb9f5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 23 deletions

View File

@ -6,8 +6,8 @@ language: cpp
env: env:
global: global:
- CPPFLAGS="" - CPPFLAGS=""
- CFLAGS="-Werror --coverage" - CFLAGS="-Werror -Werror=unused-function --coverage"
- CXXFLAGS="-Werror -Wno-deprecated-register --coverage" # glib uses register and clang raises a warning - CXXFLAGS="-Werror -Werror=unused-function -Wno-deprecated-register --coverage" # glib uses register and clang raises a warning
- LDFLAGS="--coverage" - LDFLAGS="--coverage"
- CONFIGURE_OPTS="--with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2" - CONFIGURE_OPTS="--with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2"
- NOCONFIGURE=1 - NOCONFIGURE=1

View File

@ -89,19 +89,19 @@ _get_trak (hb_face_t *face, hb_blob_t **blob = nullptr)
return trak; return trak;
} }
static inline void // static inline void
_hb_aat_layout_create (hb_face_t *face) // _hb_aat_layout_create (hb_face_t *face)
{ // {
OT::Sanitizer<AAT::morx> sanitizer; // OT::Sanitizer<AAT::morx> sanitizer;
sanitizer.set_num_glyphs (face->get_num_glyphs ()); // sanitizer.set_num_glyphs (face->get_num_glyphs ());
hb_blob_t *morx_blob = sanitizer.sanitize (face->reference_table (HB_AAT_TAG_MORX)); // hb_blob_t *morx_blob = sanitizer.sanitize (face->reference_table (HB_AAT_TAG_MORX));
OT::Sanitizer<AAT::morx>::lock_instance (morx_blob); // OT::Sanitizer<AAT::morx>::lock_instance (morx_blob);
if (0) // if (0)
{ // {
OT::Sanitizer<AAT::Lookup<OT::GlyphID> >::lock_instance (morx_blob)->get_value (1, face->get_num_glyphs ()); // OT::Sanitizer<AAT::Lookup<OT::GlyphID> >::lock_instance (morx_blob)->get_value (1, face->get_num_glyphs ());
} // }
} // }
void void
hb_aat_layout_substitute (hb_font_t *font, hb_buffer_t *buffer) hb_aat_layout_substitute (hb_font_t *font, hb_buffer_t *buffer)

View File

@ -121,15 +121,16 @@ test_set_basic (void)
hb_set_destroy (s); hb_set_destroy (s);
} }
static inline void
print_set (hb_set_t *s) // static inline void
{ // print_set (hb_set_t *s)
hb_codepoint_t next; // {
printf ("{"); // hb_codepoint_t next;
for (next = HB_SET_VALUE_INVALID; hb_set_next (s, &next); ) // printf ("{");
printf ("%d, ", next); // for (next = HB_SET_VALUE_INVALID; hb_set_next (s, &next); )
printf ("}\n"); // printf ("%d, ", next);
} // printf ("}\n");
// }
static void static void
test_set_algebra (void) test_set_algebra (void)