|
|
Choosing A Webhost: |
Problems with -Wall flag: msg#00012search.snowball
Hi all, Thanks for all your work on Snowball! FYI: The C code produced by Snowball won't compile with these flags: "-Wall -Wmissing-prototypes -Wmissing-declarations -Werror" (We use these as part of a coding standard enforcement) -Wall seems to be the culprit... and -Werror compounds the issue: I would suggest these changes: runtime/api.c ---- Fixes undefined calloc/free Line 1: #include <stdlib.h> compiler/space.c ---- Fixes "int format, pointer arg" warning Line 58: if (DEBUG) printf("<-- %d\n", (unsigned int)p); Line 69: if (DEBUG) printf("--> %d\n", (unsigned int)p); Line 75: if (DEBUG) printf("%d --> %d\n", (unsigned int)p, (unsigned int)q); compiler/analyser.c --- Fixes undefined 'exit' Line 1: #include <stdlib.h> compiler/generator.c -- Fixes undefined strlen Line 1: #include <string.h> compiler/driver.c -- Fixes undefined strlen Line 1: #include <string.h> libstemmer/libstemmer.c -- Undefined strcmp & malloc Line 1 #include <stdlib.h> Line 2 #include <string.h> examples/stemwords.c +149 -- "warning: too few arguments for format" fprintf(stderr, "language `%s' not available for stemming\n", "english"); I also get these errors in the C code generated: src_c/stem_english.c: In function `r_prelude': src_c/stem_english.c:376: warning: label `lab1' defined but not used src_c/stem_finnish.c: In function `r_case': src_c/stem_finnish.c:448: warning: unused variable `m' src_c/stem_french.c: In function `french_stem': src_c/stem_french.c:951: warning: unused variable `m' src_c/stem_porter.c: In function `porter_stem': src_c/stem_porter.c:514: warning: label `lab1' defined but not used A stupid fix for 'unused variable m' would be: compiler/generator.c 143 "int m = 0; m = z->l - z->c;"); It's easy enough to change these files.... just thought you might want to know. Thanks for your hard work on the Snowball suite! Neal Richter Knowledgebase Developer RightNow Technologies, Inc. Customer Service for Every Web Site Office: 406-522-1485
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: german stemmer question, Martin Porter |
|---|---|
| Next by Date: | Re: Problems with -Wall flag, Olly Betts |
| Previous by Thread: | german stemmer question, Christina Stahl |
| Next by Thread: | Re: Problems with -Wall flag, Olly Betts |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |