You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/09/28 19:33:10 UTC
[lucy-commits] [10/11] git commit: refs/heads/cfish-string-prep1 - Fix a couple of
warnings
Fix a couple of warnings
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/0cfbb069
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/0cfbb069
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/0cfbb069
Branch: refs/heads/cfish-string-prep1
Commit: 0cfbb0697eba03b5fad409ff2b7988667736a52a
Parents: 2fd58a1
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Sep 28 19:22:24 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Sep 28 19:29:06 2013 +0200
----------------------------------------------------------------------
clownfish/runtime/c/src/Clownfish/Err.c | 1 +
clownfish/runtime/core/Clownfish/String.c | 1 +
clownfish/runtime/core/Clownfish/Test/TestString.c | 5 ++---
clownfish/runtime/perl/xs/XSBind.c | 1 +
core/Lucy/Highlight/Highlighter.c | 2 +-
core/Lucy/Test/TestUtils.c | 2 +-
6 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/0cfbb069/clownfish/runtime/c/src/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/c/src/Clownfish/Err.c b/clownfish/runtime/c/src/Clownfish/Err.c
index b360d5a..112a9b1 100644
--- a/clownfish/runtime/c/src/Clownfish/Err.c
+++ b/clownfish/runtime/c/src/Clownfish/Err.c
@@ -75,6 +75,7 @@ Err_To_Host_IMP(Err *self) {
void
Err_throw_mess(VTable *vtable, String *message) {
+ UNUSED_VAR(vtable);
Err *err = Err_new(message);
Err_do_throw(err);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/0cfbb069/clownfish/runtime/core/Clownfish/String.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/String.c b/clownfish/runtime/core/Clownfish/String.c
index f8337d7..ee5b283 100644
--- a/clownfish/runtime/core/Clownfish/String.c
+++ b/clownfish/runtime/core/Clownfish/String.c
@@ -914,6 +914,7 @@ SStrIter_new(void *allocation, String *string, size_t byte_offset) {
void
SStrIter_Destroy_IMP(StackStringIterator *self) {
+ UNUSED_VAR(self);
THROW(ERR, "Can't destroy a StackStringIterator");
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/0cfbb069/clownfish/runtime/core/Clownfish/Test/TestString.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestString.c b/clownfish/runtime/core/Clownfish/Test/TestString.c
index a59ff4c..634154a 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestString.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestString.c
@@ -59,7 +59,6 @@ S_smiley_with_whitespace(int *num_spaces_ptr) {
0x202F, 0x205F, 0x3000
};
int num_spaces = sizeof(spaces) / sizeof(uint32_t);
- String *got;
CharBuf *buf = CB_new(0);
for (int i = 0; i < num_spaces; i++) { CB_Cat_Char(buf, spaces[i]); }
@@ -330,7 +329,7 @@ test_iterator(TestBatchRunner *runner) {
= sizeof(code_points) / sizeof(code_points[0]);
CharBuf *buf = CB_new(0);
- for (int i = 0; i < num_code_points; ++i) {
+ for (size_t i = 0; i < num_code_points; ++i) {
CB_Cat_Char(buf, code_points[i]);
}
String *string = CB_To_String(buf);
@@ -360,7 +359,7 @@ test_iterator(TestBatchRunner *runner) {
{
StringIterator *iter = Str_Top(string);
- for (int i = 0; i < num_code_points; ++i) {
+ for (size_t i = 0; i < num_code_points; ++i) {
TEST_TRUE(runner, StrIter_Has_Next(iter), "Has_Next %d", i);
int32_t code_point = StrIter_Next(iter);
TEST_INT_EQ(runner, code_point, code_points[i], "Next %d", i);
http://git-wip-us.apache.org/repos/asf/lucy/blob/0cfbb069/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
index 47d5e90..4a231cf 100644
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ b/clownfish/runtime/perl/xs/XSBind.c
@@ -854,6 +854,7 @@ CFISH_Err_To_Host_IMP(cfish_Err *self) {
void
cfish_Err_throw_mess(cfish_VTable *vtable, cfish_String *message) {
+ CHY_UNUSED_VAR(vtable);
cfish_Err *err = cfish_Err_new(message);
cfish_Err_do_throw(err);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/0cfbb069/core/Lucy/Highlight/Highlighter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/Highlighter.c b/core/Lucy/Highlight/Highlighter.c
index 2353b11..9e1eb7e 100644
--- a/core/Lucy/Highlight/Highlighter.c
+++ b/core/Lucy/Highlight/Highlighter.c
@@ -382,7 +382,7 @@ Highlighter_Raw_Excerpt_IMP(Highlighter *self, String *field_val,
int32_t start;
uint32_t max_skip;
- if (best_location <= ivars->slop) {
+ if ((uint32_t)best_location <= ivars->slop) {
// If the beginning of the string falls within the window centered
// around the hottest point in the field, start the fragment at the
// beginning.
http://git-wip-us.apache.org/repos/asf/lucy/blob/0cfbb069/core/Lucy/Test/TestUtils.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/TestUtils.c b/core/Lucy/Test/TestUtils.c
index a6bf118..c106d76 100644
--- a/core/Lucy/Test/TestUtils.c
+++ b/core/Lucy/Test/TestUtils.c
@@ -170,7 +170,7 @@ FSFolder*
TestUtils_modules_folder() {
static const char *const paths[] = { "modules", "../modules" };
- for (int i = 0; i < sizeof(paths) / sizeof(char*); i++) {
+ for (size_t i = 0; i < sizeof(paths) / sizeof(char*); i++) {
String *path = Str_newf(paths[i]);
FSFolder *modules_folder = FSFolder_new(path);
DECREF(path);