hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject hadoop git commit: HADOOP-12112. Make hadoop-common-project Native code -Wall-clean (alanburlison via cmccabe)
Date Mon, 29 Jun 2015 19:35:30 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 5a27c3fd7 -> fad291ea6


HADOOP-12112. Make hadoop-common-project Native code -Wall-clean (alanburlison via cmccabe)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fad291ea
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fad291ea
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fad291ea

Branch: refs/heads/trunk
Commit: fad291ea6dbe49782e33a32cd6608088951e2c58
Parents: 5a27c3f
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Mon Jun 29 12:34:47 2015 -0700
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Mon Jun 29 12:35:16 2015 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt              | 3 +++
 .../main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c | 1 +
 .../native/src/org/apache/hadoop/net/unix/DomainSocket.c     | 8 ++++----
 .../src/main/native/src/org/apache/hadoop/util/NativeCrc32.c | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/fad291ea/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index e8e85a0..9008ead 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -691,6 +691,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12036. Consolidate all of the cmake extensions in one directory
     (alanburlison via cmccabe)
 
+    HADOOP-12112. Make hadoop-common-project Native code -Wall-clean
+    (alanburlison via cmccabe)
+
   BUG FIXES
 
     HADOOP-11802: DomainSocketWatcher thread terminates sometimes after there

http://git-wip-us.apache.org/repos/asf/hadoop/blob/fad291ea/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
index 071d830..bc78ab2 100644
--- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
+++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
@@ -592,6 +592,7 @@ done:
 #else
   THROW(env, "java/io/IOException",
     "The function Windows.createFileWithMode0() is not supported on this platform");
+  return NULL;
 #endif
 }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/fad291ea/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c
b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c
index 55ab0c3..a3f27ee 100644
--- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c
+++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c
@@ -112,9 +112,9 @@ static jthrowable newSocketException(JNIEnv *env, int errnum,
  * to the heap if necessary.
  */
 struct flexibleBuffer {
-  int8_t *curBuf;
-  int8_t *allocBuf;
-  int8_t stackBuf[8196];
+  jbyte *curBuf;
+  jbyte *allocBuf;
+  jbyte stackBuf[8196];
 };
 
 static jthrowable flexBufInit(JNIEnv *env, struct flexibleBuffer *flexBuf, jint length)
@@ -637,7 +637,7 @@ JNIEnv *env, jclass clazz, jint fd)
  * @return               NULL on success; or the unraised exception representing
  *                       the problem.
  */
-static jthrowable write_fully(JNIEnv *env, int fd, int8_t *buf, int amt)
+static jthrowable write_fully(JNIEnv *env, int fd, jbyte *buf, int amt)
 {
   int err, res;
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/fad291ea/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/util/NativeCrc32.c
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/util/NativeCrc32.c
b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/util/NativeCrc32.c
index 74e09e6..3fceb02 100644
--- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/util/NativeCrc32.c
+++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/util/NativeCrc32.c
@@ -168,7 +168,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_util_NativeCrc32_nativeComputeChun
   // Setup complete. Actually verify checksums.
   ret = bulk_crc(data, data_len, sums, crc_type,
                             bytes_per_checksum, verify ? &error_data : NULL);
-  if (likely(verify && ret == CHECKSUMS_VALID || !verify && ret == 0)) {
+  if (likely((verify && ret == CHECKSUMS_VALID) || (!verify && ret == 0)))
{
     return;
   } else if (unlikely(verify && ret == INVALID_CHECKSUM_DETECTED)) {
     long pos = base_pos + (error_data.bad_data - data);
@@ -261,7 +261,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_util_NativeCrc32_nativeComputeChun
         env, error_data.got_crc, error_data.expected_crc,
         j_filename, pos);
       return;
-    } else if (unlikely(verify && ret != CHECKSUMS_VALID || !verify && ret
!= 0)) {
+    } else if (unlikely((verify && ret != CHECKSUMS_VALID) || (!verify &&
ret != 0))) {
       THROW(env, "java/lang/AssertionError",
         "Bad response code from native bulk_crc");
       return;


Mime
View raw message