THRIFT-3288 c_glib: Build unit tests without compiler warnings
These changes allow the unit tests for C (GLib) to build without
compiler warnings, even with additional warnings enabled. They
include
- Disabling string-function optimizations when glibc is used, as
these produce compiler warnings when a string function is used
within a call to assert ();
- Remove the "LL" suffix (added in C99) from 64-bit integer
literals;
- Replace C++-style ("//") comments with C-style equivalents;
- Remove unused constant declarations that generated warnings;
and
- Mark (or remove, from main ()) unused function parameters.
diff --git a/lib/c_glib/test/teststruct.c b/lib/c_glib/test/teststruct.c
index a1b3cc0..5d4baf3 100755
--- a/lib/c_glib/test/teststruct.c
+++ b/lib/c_glib/test/teststruct.c
@@ -51,6 +51,10 @@
thrift_test_struct_read (ThriftStruct *object, ThriftProtocol *protocol,
GError **error)
{
+ THRIFT_UNUSED_VAR (object);
+ THRIFT_UNUSED_VAR (protocol);
+ THRIFT_UNUSED_VAR (error);
+
return 0;
}
@@ -58,6 +62,10 @@
thrift_test_struct_write (ThriftStruct *object, ThriftProtocol *protocol,
GError **error)
{
+ THRIFT_UNUSED_VAR (object);
+ THRIFT_UNUSED_VAR (protocol);
+ THRIFT_UNUSED_VAR (error);
+
return 0;
}