THRIFT-664. rb: Ruby extension fails to build with Ruby 1.9.1
This change takes care of the 1.9 build issues and a few other c-extension niceties.
Patch: Rajesh Malepati
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@984524 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/compact_protocol.c b/lib/rb/ext/compact_protocol.c
index 3caa500..6c0123d 100644
--- a/lib/rb/ext/compact_protocol.c
+++ b/lib/rb/ext/compact_protocol.c
@@ -20,8 +20,8 @@
#include <ruby.h>
#include <stdbool.h>
#include <stdint.h>
-#include <constants.h>
-#include <struct.h>
+#include "constants.h"
+#include "struct.h"
#include "macros.h"
#define LAST_ID(obj) FIX2INT(rb_ary_pop(rb_ivar_get(obj, last_field_id)))
@@ -458,7 +458,7 @@
if (modifier == 0) {
// not a delta. look ahead for the zigzag varint field id.
- LAST_ID(self);
+ (void) LAST_ID(self);
field_id = read_i16(self);
} else {
// has a delta. add the delta to the last read field id.