cwb/cqp/options.h
-----------------
The file is copied to _options.h, and include "concordance.h" is commented out in _options.h
The cpp file with the cqp functions calls _options.h. This omits that a series of includes is
performed that causes an error.


cwb/cqp/hash.c
--------------

The following symbols/functions are defined exactly the same way in cl/lexhash.c and cqp/hash.c:
hash_string
is_prime
find_prime
To avoid linker errors, the functions are commented out in cqp/hash.c


cwb/cqp/Makefile
----------------

# target all modified

all: libcqp.a

# new target added - to generate libcqp.a

libcqp.a: $(OBJS) $(CQI_OBJS)
        $(RM) $@
        $(AR) $@ $^
        $(RANLIB) $@


cwb/cqp/table.h
---------------

These lines provoke a warning from header guard:
#ifndef _cqp_table_h
#define _cqp_table_h_

Replaced with:

#ifndef _cqp_table_h_
#define _cqp_table_h_

cwb/cqp/*
---------

printf needs to be replaced by Rprintf - ultimately did that manually

cwb/cl/endian.h
---------------

The file causes issues with the endian.h system file. The best solution 
I could come up with is to rename endian.h into endian2.h.  Then
- also turn endian.h into endian2.h in the Makefile
- change include statements to 'include "endian2.h"'


cwb/cqp/sgml-print.c ; latex-print.c ; ascii-print.c ; html-print.c
-------------------------------------------------------------------
file 'sgml-print.c', 'latex-print.c', 'ascii-print.c' and 'html-print.c' in ./src/cwb/cqp:
include for header file time.h added (in addition to sys/time.h):
#include <time.h>
to avoid warning of implicit function declaration 

cwb/cqp/eval.c
--------------
line 2891 changed:
assert(col->type = tabular); turned into
assert((col->type = tabular));
to avoid -Wparentheses error (on Debian CRAN machine)

flex/bison
-----------
The flex and bison parsers may be missing on CRAN build machines. To avoid 
errors, parsed files files are generated and included:
registry.tab.c
registry.tab.h
registry.y


Datei corpmanag.c
-----------------
Funktion 'valid_subcorpus_name' neu:
Boolean
valid_subcorpus_name(char *corpusname) {
  char mother[MAX_LINE_LENGTH];
  return ((split_subcorpus_name(corpusname, mother) == NULL) ? False : True);
}
--> vorher nur split_subcorpus_name ohne parameter

Behebt folgenden Fehler:
Found the following significant warnings:
  corpmanag.c:1717:12: warning: comparison of function 'split_subcorpus_name' equal to a null pointer is always false [-Wtautological-pointer-compare]


Datei cl/lex.reg.c
------------------
Funktion 'static void yyunput (int c, register char * yy_bp )' auskommentiert, zur Vermeidung Nachricht:
lex.creg.c:1410:17: warning: unused function 'yyunput' [-Wunused-function]


Funktion open_temporary_file
----------------------------
open_temporary_file(char *tmp_name_buffer) auskommentiert in cqp/output.c
Platzhalter auskommentiert in cqp/output.h
Funktionen auskommentiert, die open_temporary_file aufrufen:
- ComputeGroupExternally (cqp/groups.c)
- SortExternally (cqp/ranges.c)
Wiederum Aufrufe dieser Funktionen auskommentiert
Dadurch Vermeidung der Warnmeldung:

Datei cl/lex.yy.c
-----------------
Funktion yyunput auskommentiert, zur Vermeidung von FEhler:
lex.yy.c:2459:17: warning: unused function 'yyunput' [-Wunused-function]
auskommentiert: static int input  (void)
um zu vermeiden:
lex.yy.c:2500:16: warning: function 'input' is not needed and will not be emitted [-Wunneeded-internal-declaration]


Code adjustments to avoid warning 'unused-but-set-variable'
===========================================================
  

_cwb_huffcode.c: In function ‘print_heap’:
_cwb_huffcode.c:146:13: warning: variable ‘depth’ set but not used [-Wunused-but-set-variable]
int node, depth;
^
  
_cwb_huffcode.c:146:7: warning: variable ‘node’ set but not used [-Wunused-but-set-variable]
int node, depth;
^
  
_cwb_huffcode.c: In function ‘compute_code_lengths’:
_cwb_huffcode.c:304:7: warning: variable ‘nr_codes’ set but not used [-Wunused-but-set-variable]
int nr_codes = 0;
^
  
ngram-hash.c: In function ‘cl_delete_ngram_hash’:
ngram-hash.c:146:30: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable]
cl_ngram_hash_entry entry, temp;



    
attributes.c:755:19: warning: variable ‘dollar’ set but not used [-Wunused-but-set-variable]
int ppos, bpos, dollar, rpos;


cdaccess.c: In function ‘cl_regex2id’:
cdaccess.c:1392:20: warning: variable ‘off_end’ set but not used [-Wunused-but-set-variable]
int off_start, off_end;     /* start and end offset of current lexicon entry */
^

cdaccess.c: In function ‘cl_dynamic_call’:
cdaccess.c:2533:17: warning: variable ‘arg’ set but not used [-Wunused-but-set-variable]
DynCallResult arg;
^


eval.c: In function ‘cqp_run_tab_query’:
eval.c:2911:21: warning: variable ‘corpus_size’ set but not used [-Wunused-but-set-variable]
int smallest_col, corpus_size;
^

regex2dfa.c: In function ‘Parse’:
regex2dfa.c:544:7: warning: variable ‘ignore_value’ set but not used [-Wunused-but-set-variable]
int ignore_value;             /* ignore value of POP() macro */
^

sgml-print.c: In function ‘sgml_print_output’:
sgml-print.c:325:18: warning: variable ‘strucs’ set but not used [-Wunused-but-set-variable]
AttributeList *strucs;
^

html-print.c: In function ‘html_print_context’:
html-print.c:317:9: warning: variable ‘s’ set but not used [-Wunused-but-set-variable]
char *s;
^

html-print.c: In function ‘html_print_output’:
html-print.c:418:18: warning: variable ‘strucs’ set but not used [-Wunused-but-set-variable]
AttributeList *strucs;
^

latex-print.c: In function ‘latex_print_context’:
latex-print.c:236:9: warning: variable ‘s’ set but not used [-Wunused-but-set-variable]
char *s;
^

parser.y: In function ‘yyparse’:
parser.y:820:23: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
int ok;
^


  
unused-result
=============

storage.c: In function ‘mmapfile’:
storage.c:335:12: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fd, &fd, sizeof(int));
^


cdaccess.c:2697:12: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(call, CL_MAX_LINE_LENGTH, pipe);
^


Parentheses
============

regopt.c: In function ‘make_jump_table’:
regopt.c:1148:18: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
if (ch >= 32 & ch < 127)
^


Will always evaluate to true
============================

attributes.c: In function ‘component_full_name’:
macros.h:59:22: warning: the address of ‘rname’ will always evaluate as ‘true’ [-Waddress]
((a) && (b) && (strcmp((a), (b)) == 0)))
^

attributes.c:807:11: note: in expansion of macro ‘STREQ’
if (STREQ(rname, "HOME"))
^
macros.h:59:22: warning: the address of ‘rname’ will always evaluate as ‘true’ [-Waddress]
((a) && (b) && (strcmp((a), (b)) == 0)))
^
attributes.c:809:16: note: in expansion of macro ‘STREQ’
else if (STREQ(rname, "APATH"))
^
macros.h:59:22: warning: the address of ‘rname’ will always evaluate as ‘true’ [-Waddress]
((a) && (b) && (strcmp((a), (b)) == 0)))
^
attributes.c:812:16: note: in expansion of macro ‘STREQ’
else if (STREQ(rname, "ANAME"))
^



Implicit function declaration
=============================

_cwb_makeall.c: In function ‘validate_revcorp’:
_cwb_makeall.c:139:3: warning: implicit declaration of function ‘ntohl’ [-Wimplicit-function-declaration]
if (ntohl(revcorp->data.data[ptab[id]]) != cpos) {
^
