fix build with clang6; from Matthew Martin

This commit is contained in:
jasper 2018-04-15 10:39:32 +00:00
parent 13642fe274
commit ef75639957
2 changed files with 41 additions and 7 deletions

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-jlint_cc,v 1.5 2017/04/14 00:44:21 ian Exp $
--- jlint.cc.orig Mon Jan 10 21:42:33 2011
+++ jlint.cc Wed Apr 12 14:39:37 2017
$OpenBSD: patch-jlint_cc,v 1.6 2018/04/15 10:39:32 jasper Exp $
Index: jlint.cc
--- jlint.cc.orig
+++ jlint.cc
@@ -41,7 +41,7 @@ bool source_path_redefined = false;
int reported_message_mask = cat_all;
FILE* history;
@ -33,7 +34,7 @@ $OpenBSD: patch-jlint_cc,v 1.5 2017/04/14 00:44:21 ian Exp $
break;
case 'd': // integer
- dst += sprintf(dst, "%d", (int)(long)parameter[index]);
+ dst += sprintf(dst, "%d", (long)parameter[index]);
+ dst += sprintf(dst, "%ld", (long)parameter[index]);
break;
default:
assert(false/*bad message parameter format*/);
@ -66,3 +67,21 @@ $OpenBSD: patch-jlint_cc,v 1.5 2017/04/14 00:44:21 ian Exp $
monitor_stack::const_iterator it;
for (it = this_class->usedLocks.begin();
@@ -662,7 +662,7 @@ inline int stricmp(const char* p, const char* q)
return 0;
}
-void proceed_file(char* file_name, bool recursive = false)
+void proceed_file(char* file_name, int recursive = 0)
{
#ifdef _WIN32
HANDLE dir;
@@ -1041,7 +1041,7 @@ int main(int argc, char* argv[])
if (verbose) {
fprintf(stderr,
"Jlint - program correctness verifier for Java, "
- "version %s ("__DATE__").\n", VERSION);
+ "version %s (" __DATE__ ").\n", VERSION);
}
continue;
}

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-types_hh,v 1.4 2015/06/17 19:06:58 jasper Exp $
--- types.hh.orig Fri Oct 13 08:52:50 2006
+++ types.hh Wed Jun 17 21:03:25 2015
$OpenBSD: patch-types_hh,v 1.5 2018/04/15 10:39:32 jasper Exp $
Index: types.hh
--- types.hh.orig
+++ types.hh
@@ -2,10 +2,10 @@
#define TYPES_HH
@ -13,3 +14,17 @@ $OpenBSD: patch-types_hh,v 1.4 2015/06/17 19:06:58 jasper Exp $
#include <string>
#include <vector>
#include <stddef.h>
@@ -141,10 +141,10 @@ struct vbm_operand {
int_type_range const ranges[] = {
// min max
{0x00000000, 0x00000001}, // tp_bool
- {0xffffff80, 0x0000007f}, // tp_byte
+ {-0x00000080, 0x0000007f}, // tp_byte
{0x00000000, 0x0000ffff}, // tp_char
- {0xffff8000, 0x00007fff}, // tp_short
- {0x80000000, 0x7fffffff} // tp_int
+ {-0x00008000, 0x00007fff}, // tp_short
+ {static_cast<int>(-0x80000000), 0x7fffffff} // tp_int
};
int const array_type[] = {