aboutsummaryrefslogtreecommitdiff
path: root/libraries/libreadline-java/patches/8cf1b175458acd54cf2f4c2eee166dd8cdfe5e80.patch
blob: 108e9d95fb9ca6ff85f97801ec4c3ee430e67fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 8cf1b175458acd54cf2f4c2eee166dd8cdfe5e80 Mon Sep 17 00:00:00 2001
From: Andrew Clemons <andrew.clemons@gmail.com>
Date: Sat, 10 Jun 2017 15:38:14 +1200
Subject: [PATCH] Fix compilation with clang

---
 src/native/Makefile                    |  9 ++++-----
 src/native/org_gnu_readline_Readline.c | 12 ++++++------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/native/org_gnu_readline_Readline.c b/src/native/org_gnu_readline_Readline.c
index 2877a16..1cf8493 100644
--- a/src/native/org_gnu_readline_Readline.c
+++ b/src/native/org_gnu_readline_Readline.c
@@ -341,7 +341,7 @@ JNIEXPORT void JNICALL Java_org_gnu_readline_Readline_initReadlineImpl
 }
 
 /* -------------------------------------------------------------------------- */
-/* Reset readline's internal states and terminal.
+/* Reset readline's internal states and terminal.                             */
 /* -------------------------------------------------------------------------- */
 
 #ifndef JavaGetline
@@ -356,7 +356,7 @@ JNIEXPORT void JNICALL Java_org_gnu_readline_Readline_cleanupReadlineImpl
 
 
 /* -------------------------------------------------------------------------- */
-/* Report, if we have a terminal
+/* Report, if we have a terminal                                              */
 /* -------------------------------------------------------------------------- */
 
 #ifndef JavaGetline
@@ -666,7 +666,7 @@ const char *java_completer(char *text, int state) {
   jtext = (*jniEnv)->NewStringUTF(jniEnv,text);
 
   if (jniMethodId == 0) {
-    return;
+    return ((const char *) NULL);
   }
 
   completion = (*jniEnv)->CallObjectMethod(jniEnv, jniObject,
@@ -721,7 +721,7 @@ JNIEXPORT void JNICALL Java_org_gnu_readline_Readline_setCompleterImpl
 #endif
 
 /* -------------------------------------------------------------------------- */
-/* Returns rl_line_buffer
+/* Returns rl_line_buffer                                                     */
 /* -------------------------------------------------------------------------- */
 
 #ifndef JavaGetline