Skip to content

Commit f4c601e

Browse files
Fix compiler warnings
1 parent 279ebd0 commit f4c601e

42 files changed

Lines changed: 18446 additions & 18996 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ AS_IF([ test "$enable_code_coverage" = "yes" ], [
6868
])
6969

7070

71-
# Enable compiler warnings
71+
# Enable compiler warnings
7272

7373
AC_ARG_ENABLE([compile-warnings],
7474
[AS_HELP_STRING([--enable-compile-warnings], [enable compiler warnings])],
@@ -104,7 +104,7 @@ AX_CHECK_BLISS
104104

105105
# Check whether to use -mpopcnt and __builtin_ctzl
106106
AC_ARG_WITH([intrinsics],
107-
[AS_HELP_STRING([--without-intrinsics],
107+
[AS_HELP_STRING([--without-intrinsics],
108108
[do not use compiler intrinsics even if available])]
109109
)
110110

extern/bliss-0.73/bliss_C.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ extern "C" {
2525
along with bliss. If not, see <http://www.gnu.org/licenses/>.
2626
*/
2727

28+
#if defined(__clang__)
29+
#pragma clang diagnostic push
30+
#pragma clang diagnostic ignored "-Wold-style-cast"
31+
#pragma clang diagnostic ignored "-Wsign-compare"
32+
#endif
33+
2834
struct bliss_digraphs_graph_struct {
2935
bliss_digraphs::Graph* g;
3036
};
@@ -229,3 +235,7 @@ void bliss_digraphs_free_blissstats(BlissStats *stats)
229235
free(stats->group_size);
230236
#endif
231237
}
238+
239+
#if defined(__clang__)
240+
#pragma clang diagnostic pop
241+
#endif

extern/bliss-0.73/defs.cc

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <cstdlib>
2-
#include <cstdio>
31
#include "defs.hh"
2+
#include <cstdio>
3+
#include <cstdlib>
44

55
/*
66
Copyright (c) 2003-2015 Tommi Junttila
@@ -21,18 +21,25 @@
2121
along with bliss. If not, see <http://www.gnu.org/licenses/>.
2222
*/
2323

24+
#if defined(__clang__)
25+
#pragma clang diagnostic push
26+
#pragma clang diagnostic ignored "-Wformat-nonliteral"
27+
#pragma clang diagnostic ignored "-Wmissing-noreturn"
28+
#endif
2429
namespace bliss_digraphs {
2530

26-
void
27-
fatal_error(const char* fmt, ...)
28-
{
29-
va_list ap;
30-
va_start(ap, fmt);
31-
fprintf(stderr,"Bliss fatal error: ");
32-
vfprintf(stderr, fmt, ap);
33-
fprintf(stderr, "\nAborting!\n");
34-
va_end(ap);
35-
exit(1);
36-
}
37-
38-
}
31+
void fatal_error(const char* fmt, ...) {
32+
va_list ap;
33+
va_start(ap, fmt);
34+
fprintf(stderr, "Bliss fatal error: ");
35+
vfprintf(stderr, fmt, ap);
36+
fprintf(stderr, "\nAborting!\n");
37+
va_end(ap);
38+
exit(1);
39+
}
40+
41+
} // namespace bliss_digraphs
42+
43+
#if defined(__clang__)
44+
#pragma clang diagnostic pop
45+
#endif

0 commit comments

Comments
 (0)