HADOOP-12112. Make hadoop-common-project Native code -Wall-clean (alanburlison via cmccabe)
This commit is contained in:
parent
df58fdaf21
commit
5ff14f2342
|
@ -193,6 +193,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HADOOP-12036. Consolidate all of the cmake extensions in one directory
|
HADOOP-12036. Consolidate all of the cmake extensions in one directory
|
||||||
(alanburlison via cmccabe)
|
(alanburlison via cmccabe)
|
||||||
|
|
||||||
|
HADOOP-12112. Make hadoop-common-project Native code -Wall-clean
|
||||||
|
(alanburlison via cmccabe)
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
HADOOP-11802: DomainSocketWatcher thread terminates sometimes after there
|
HADOOP-11802: DomainSocketWatcher thread terminates sometimes after there
|
||||||
|
|
|
@ -592,6 +592,7 @@ done:
|
||||||
#else
|
#else
|
||||||
THROW(env, "java/io/IOException",
|
THROW(env, "java/io/IOException",
|
||||||
"The function Windows.createFileWithMode0() is not supported on this platform");
|
"The function Windows.createFileWithMode0() is not supported on this platform");
|
||||||
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,9 +112,9 @@ static jthrowable newSocketException(JNIEnv *env, int errnum,
|
||||||
* to the heap if necessary.
|
* to the heap if necessary.
|
||||||
*/
|
*/
|
||||||
struct flexibleBuffer {
|
struct flexibleBuffer {
|
||||||
int8_t *curBuf;
|
jbyte *curBuf;
|
||||||
int8_t *allocBuf;
|
jbyte *allocBuf;
|
||||||
int8_t stackBuf[8196];
|
jbyte stackBuf[8196];
|
||||||
};
|
};
|
||||||
|
|
||||||
static jthrowable flexBufInit(JNIEnv *env, struct flexibleBuffer *flexBuf, jint length)
|
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
|
* @return NULL on success; or the unraised exception representing
|
||||||
* the problem.
|
* 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;
|
int err, res;
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_util_NativeCrc32_nativeComputeChun
|
||||||
// Setup complete. Actually verify checksums.
|
// Setup complete. Actually verify checksums.
|
||||||
ret = bulk_crc(data, data_len, sums, crc_type,
|
ret = bulk_crc(data, data_len, sums, crc_type,
|
||||||
bytes_per_checksum, verify ? &error_data : NULL);
|
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;
|
return;
|
||||||
} else if (unlikely(verify && ret == INVALID_CHECKSUM_DETECTED)) {
|
} else if (unlikely(verify && ret == INVALID_CHECKSUM_DETECTED)) {
|
||||||
long pos = base_pos + (error_data.bad_data - data);
|
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,
|
env, error_data.got_crc, error_data.expected_crc,
|
||||||
j_filename, pos);
|
j_filename, pos);
|
||||||
return;
|
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",
|
THROW(env, "java/lang/AssertionError",
|
||||||
"Bad response code from native bulk_crc");
|
"Bad response code from native bulk_crc");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue