You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ma...@apache.org on 2010/03/04 04:06:06 UTC
svn commit: r918833 - in /hadoop/avro/trunk: CHANGES.txt
lang/c/src/datafile.c lang/c/src/datum_read.c lang/c/src/datum_write.c
lang/c/src/io.c lang/c/src/st.c
Author: massie
Date: Thu Mar 4 03:06:06 2010
New Revision: 918833
URL: http://svn.apache.org/viewvc?rev=918833&view=rev
Log:
AVRO-444. Fix warnings. Contributed by Bruce Mitchener.
Modified:
hadoop/avro/trunk/CHANGES.txt
hadoop/avro/trunk/lang/c/src/datafile.c
hadoop/avro/trunk/lang/c/src/datum_read.c
hadoop/avro/trunk/lang/c/src/datum_write.c
hadoop/avro/trunk/lang/c/src/io.c
hadoop/avro/trunk/lang/c/src/st.c
Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=918833&r1=918832&r2=918833&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Thu Mar 4 03:06:06 2010
@@ -28,6 +28,8 @@
AVRO-442. sizeof void* and sizeof long detected at configure time
(Bruce Mitchener via massie)
+ AVRO-444. Fix warnings (Bruce Mitchener via massie)
+
BUG FIXES
AVRO-424. Fix the specification of the deflate codec.
Modified: hadoop/avro/trunk/lang/c/src/datafile.c
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c/src/datafile.c?rev=918833&r1=918832&r2=918833&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c/src/datafile.c (original)
+++ hadoop/avro/trunk/lang/c/src/datafile.c Thu Mar 4 03:06:06 2010
@@ -45,7 +45,7 @@
/* TODO: should we just read /dev/random? */
static void generate_sync(struct avro_file_writer_t *w)
{
- int i;
+ unsigned int i;
srand(time(NULL));
for (i = 0; i < sizeof(w->sync); i++) {
w->sync[i] = ((double)rand() / (RAND_MAX + 1.0)) * 255;
Modified: hadoop/avro/trunk/lang/c/src/datum_read.c
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c/src/datum_read.c?rev=918833&r1=918832&r2=918833&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c/src/datum_read.c (original)
+++ hadoop/avro/trunk/lang/c/src/datum_read.c Thu Mar 4 03:06:06 2010
@@ -286,7 +286,6 @@
avro_schema_t readers_schema, avro_datum_t * datum)
{
int rval = EINVAL;
- long i;
const avro_encoding_t *enc = &avro_binary_encoding;
if (!reader || !is_avro_schema(writers_schema) || !datum) {
Modified: hadoop/avro/trunk/lang/c/src/datum_write.c
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c/src/datum_write.c?rev=918833&r1=918832&r2=918833&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c/src/datum_write.c (original)
+++ hadoop/avro/trunk/lang/c/src/datum_write.c Thu Mar 4 03:06:06 2010
@@ -175,8 +175,6 @@
static int write_datum(avro_writer_t writer, const avro_encoding_t * enc,
avro_schema_t writers_schema, avro_datum_t datum)
{
- int rval;
-
if (is_avro_schema(writers_schema) && is_avro_link(writers_schema)) {
return write_datum(writer, enc,
(avro_schema_to_link(writers_schema))->to,
@@ -272,9 +270,6 @@
int avro_write_data(avro_writer_t writer, avro_schema_t writers_schema,
avro_datum_t datum)
{
- const avro_encoding_t *enc = &avro_binary_encoding;
- int rval = -1;
-
if (!writer || !is_avro_datum(datum)) {
return EINVAL;
}
Modified: hadoop/avro/trunk/lang/c/src/io.c
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c/src/io.c?rev=918833&r1=918832&r2=918833&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c/src/io.c (original)
+++ hadoop/avro/trunk/lang/c/src/io.c Thu Mar 4 03:06:06 2010
@@ -167,7 +167,7 @@
return 0;
}
- if (needed > sizeof(reader->buffer)) {
+ if (needed > (int64_t) sizeof(reader->buffer)) {
if (bytes_available(reader) > 0) {
memcpy(p, reader->cur, bytes_available(reader));
p += bytes_available(reader);
Modified: hadoop/avro/trunk/lang/c/src/st.c
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c/src/st.c?rev=918833&r1=918832&r2=918833&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c/src/st.c (original)
+++ hadoop/avro/trunk/lang/c/src/st.c Thu Mar 4 03:06:06 2010
@@ -109,7 +109,7 @@
static int new_size(size)
int size;
{
- int i;
+ unsigned int i;
#if 0
for (i = 3; i < 31; i++) {