patch-jlint_cc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. $OpenBSD: patch-jlint_cc,v 1.5 2017/04/14 00:44:21 ian Exp $
  2. --- jlint.cc.orig Mon Jan 10 21:42:33 2011
  3. +++ jlint.cc Wed Apr 12 14:39:37 2017
  4. @@ -41,7 +41,7 @@ bool source_path_redefined = false;
  5. int reported_message_mask = cat_all;
  6. FILE* history;
  7. string_pool stringPool;
  8. -field_desc* is_const;
  9. +field_desc* my_is_const;
  10. message_descriptor msg_table[] =
  11. {
  12. @@ -138,7 +138,7 @@ int get_type(utf_string const& str)
  13. void format_message(int code, utf_string const& file, int line, __VALIST ap)
  14. {
  15. - static int loop_id;
  16. + static long loop_id;
  17. static message_node *first, *last;
  18. static char* compound_message;
  19. const void* parameter[MAX_MSG_PARAMETERS];
  20. @@ -151,7 +151,7 @@ void format_message(int code, utf_string const& file,
  21. if (compound_message != NULL
  22. && ((loop_id != 0
  23. && ((code != msg_loop && code != msg_sync_loop)
  24. - || (int)(long)parameter[2] != loop_id))
  25. + || (long)parameter[2] != loop_id))
  26. || (loop_id == 0 && code != msg_wait_path)))
  27. {
  28. if (!message_node::find(compound_message)) {
  29. @@ -226,7 +226,7 @@ void format_message(int code, utf_string const& file,
  30. name.as_asciz());
  31. break;
  32. case 'd': // integer
  33. - dst += sprintf(dst, "%d", (int)(long)parameter[index]);
  34. + dst += sprintf(dst, "%d", (long)parameter[index]);
  35. break;
  36. default:
  37. assert(false/*bad message parameter format*/);
  38. @@ -262,7 +262,7 @@ void format_message(int code, utf_string const& file,
  39. compound_message = strdup(his_buf);
  40. first = last = new message_node(msg_buf);
  41. if (code != msg_wait) {
  42. - loop_id = (int)(long)parameter[2];
  43. + loop_id = (long)parameter[2];
  44. }
  45. } else if (!message_node::find(his_buf)) {
  46. fprintf(stdout, "%s\n", msg_buf);
  47. @@ -401,8 +401,8 @@ bool parse_class_file(byte* fp)
  48. is_this->equals = is_this;
  49. is_this->cls = this_class;
  50. - // init. is_const
  51. - field_desc* is_const = new field_desc(utf_string("<const>"), NULL, NULL);
  52. + // init. my_is_const
  53. + field_desc* my_is_const = new field_desc(utf_string("<const>"), NULL, NULL);
  54. this_class->attr = access_flags;
  55. if (super_class_name == 0) { // Object class
  56. @@ -627,7 +627,7 @@ bool parse_class_file(byte* fp)
  57. delete[] constant_pool;
  58. delete is_this->name_and_type;
  59. //delete is_this;
  60. - delete is_const;
  61. + delete my_is_const;
  62. monitor_stack::const_iterator it;
  63. for (it = this_class->usedLocks.begin();