summaryrefslogblamecommitdiffstats
path: root/source/l/strigi/libstreamanalyzer-0003-Fix-Krazy-issues.patch
blob: fab4883212708b68fda64da5870b5d8de7ffff69 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                  
From 8af24118fec3a0effee3a01ad37f4c4daddfe700 Mon Sep 17 00:00:00 2001
From: Jos van den Oever <jos@vandenoever.info>
Date: Fri, 12 Jul 2013 15:15:18 +0200
Subject: [PATCH 3/5] Fix Krazy issues.

---
 .krazy                                             |  2 +
 cmake/FindCLucene.cmake                            | 18 ++++++++
 cmake/FindCLucene1.cmake                           | 18 ++++++++
 cmake/FindExiv2.cmake                              |  2 +-
 cmake/FindFFmpeg.cmake                             |  2 +-
 cmake/FindIconv.cmake                              | 19 ++++++++
 cmake/FindXAttr.cmake                              | 19 ++++++++
 include/strigi/classproperties.h                   |  4 +-
 include/strigi/fieldproperties.h                   |  4 +-
 include/strigi/fieldtypes.h                        |  4 +-
 include/strigi/filelister.h                        |  4 +-
 include/strigi/streamanalyzer.h                    |  2 +-
 include/strigi/variant.h                           | 14 +++---
 lib/endanalyzers/arendanalyzer.h                   |  2 +-
 lib/endanalyzers/bmpendanalyzer.h                  |  2 +-
 lib/endanalyzers/bz2endanalyzer.h                  |  2 +-
 lib/endanalyzers/flacendanalyzer.h                 |  2 +-
 lib/endanalyzers/gzipendanalyzer.h                 |  2 +-
 lib/endanalyzers/id3endanalyzer.cpp                |  6 +--
 lib/endanalyzers/id3endanalyzer.h                  |  2 +-
 lib/endanalyzers/lzmaendanalyzer.h                 |  2 +-
 lib/endanalyzers/mailendanalyzer.h                 |  2 +-
 lib/endanalyzers/mpegendanalyzer.h                 |  2 +-
 lib/endanalyzers/odfendanalyzer.h                  |  2 +-
 lib/endanalyzers/oleendanalyzer.h                  |  2 +-
 lib/endanalyzers/pdfendanalyzer.h                  |  2 +-
 lib/endanalyzers/pngendanalyzer.h                  |  2 +-
 lib/endanalyzers/rpmendanalyzer.h                  |  2 +-
 lib/endanalyzers/sdfendanalyzer.h                  |  2 +-
 lib/endanalyzers/tarendanalyzer.h                  |  2 +-
 lib/endanalyzers/zipendanalyzer.h                  |  2 +-
 lib/eventanalyzers/mimeeventanalyzer.h             |  2 +-
 lib/eventthroughanalyzer.h                         |  2 +-
 lib/fieldpropertiesdb.cpp                          | 20 ++++----
 lib/helperanalyzers/odfcontenthelperanalyzer.cpp   |  1 -
 lib/helperanalyzers/odfmetahelperanalyzer.cpp      |  1 -
 lib/libstreamanalyzer.pc.cmake                     | 19 ++++++++
 lib/lineanalyzers/m3ustreamanalyzer.h              |  2 +-
 lib/lineanalyzers/odfmimetypelineanalyzer.h        |  2 +-
 lib/lineeventanalyzer.h                            |  2 +-
 lib/logging.h                                      |  2 +-
 lib/rdfnamespaces.h                                |  4 +-
 lib/saxeventanalyzer.h                             |  2 +-
 lib/throughanalyzers/oggthroughanalyzer.h          |  2 +-
 lib/xmlparser/xmlstream.h                          |  4 +-
 plugins/endplugins/ffmpegendanalyzer.cpp           |  6 +--
 plugins/eventplugins/SHA1.h                        |  6 +--
 .../indexers/cluceneindexer/cluceneindexreader.cpp |  4 +-
 .../indexers/cluceneindexer/cluceneindexwriter.cpp | 54 +---------------------
 .../cluceneindexer/jsgzipcompressstream.cpp        |  2 +-
 .../indexers/cluceneindexer/tests/CLuceneTest.cpp  | 19 ++++++++
 plugins/indexers/cluceneindexer/timeofday.h        | 39 ++++++++--------
 .../clucenengindexer/cluceneindexreader.cpp        |  8 ++--
 .../clucenengindexer/cluceneindexwriter.cpp        |  4 +-
 .../clucenengindexer/indexdump/indexdump.cpp       |  5 +-
 .../clucenengindexer/tests/CLuceneTest.cpp         | 19 ++++++++
 plugins/indexers/clucenengindexer/timeofday.h      | 39 ++++++++--------
 plugins/lineplugins/deblineanalyzer.h              |  2 +-
 plugins/throughplugins/authroughanalyzer.h         |  2 +-
 plugins/throughplugins/dummy.cpp                   | 19 ++++++++
 plugins/throughplugins/pcxthroughanalyzer.h        |  2 +-
 61 files changed, 271 insertions(+), 176 deletions(-)
 create mode 100644 .krazy

diff --git a/.krazy b/.krazy
new file mode 100644
index 0000000..b0e1177
--- /dev/null
+++ b/.krazy
@@ -0,0 +1,2 @@
+# see http://techbase.kde.org/Development/Tutorials/Code_Checking#Controlling_Krazy_on_the_EBN for an explanation of this file
+EXCLUDE syscalls,typedefs
diff --git a/cmake/FindCLucene.cmake b/cmake/FindCLucene.cmake
index 906afcc..31d1557 100644
--- a/cmake/FindCLucene.cmake
+++ b/cmake/FindCLucene.cmake
@@ -1,3 +1,21 @@
+# This file is part of Strigi Desktop Search
+#
+# Copyright (C) 2007 Jos van den Oever <jos@vandenoever.info>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
 #
 # This module looks for clucene (http://clucene.sf.net) support
 # It will define the following values
diff --git a/cmake/FindCLucene1.cmake b/cmake/FindCLucene1.cmake
index ae431c8..d8ce7dd 100644
--- a/cmake/FindCLucene1.cmake
+++ b/cmake/FindCLucene1.cmake
@@ -1,3 +1,21 @@
+# This file is part of Strigi Desktop Search
+#
+# Copyright (C) 2007 Jos van den Oever <jos@vandenoever.info>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
 #
 # This module looks for clucene (http://clucene.sf.net) support
 # It will define the pkgconfig values with a CLUCENE1_ prefix...
diff --git a/cmake/FindExiv2.cmake b/cmake/FindExiv2.cmake
index 5997c98..7ddb6ac 100644
--- a/cmake/FindExiv2.cmake
+++ b/cmake/FindExiv2.cmake
@@ -13,7 +13,7 @@
 # The minimum required version of Exiv2 can be specified using the
 # standard syntax, e.g. find_package(Exiv2 0.17)
 #
-# For compatiblity, also the variable EXIV2_MIN_VERSION can be set to the minimum version
+# For compatibility, also the variable EXIV2_MIN_VERSION can be set to the minimum version
 # you need before doing FIND_PACKAGE(Exiv2). The default is 0.12.
 
 # Copyright (c) 2010, Alexander Neundorf, <neundorf@kde.org>
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
index 526be5f..4e1d50e 100644
--- a/cmake/FindFFmpeg.cmake
+++ b/cmake/FindFFmpeg.cmake
@@ -7,7 +7,7 @@
 #  FFMPEG_LIBRARIES     - Link these to use the required ffmpeg components.
 #  FFMPEG_DEFINITIONS   - Compiler switches required for using the required ffmpeg components.
 #
-# For each of the components it will additionaly set.
+# For each of the components it will additionally set.
 #   - AVCODEC
 #   - AVDEVICE
 #   - AVFORMAT
diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
index ce40ab2..fd5a3af 100644
--- a/cmake/FindIconv.cmake
+++ b/cmake/FindIconv.cmake
@@ -1,3 +1,22 @@
+# This file is part of Strigi Desktop Search
+#
+# Copyright (C) 2006 Jos van den Oever <jos@vandenoever.info>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
 # - Try to find Iconv 
 # Once done this will define 
 # 
diff --git a/cmake/FindXAttr.cmake b/cmake/FindXAttr.cmake
index c285a46..c66884e 100644
--- a/cmake/FindXAttr.cmake
+++ b/cmake/FindXAttr.cmake
@@ -1,3 +1,22 @@
+# This file is part of Strigi Desktop Search
+#
+# Copyright (C) 2007 Jos van den Oever <jos@vandenoever.info>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
 # - Try to find the xattr header
 # Once done this will define 
 # 
diff --git a/include/strigi/classproperties.h b/include/strigi/classproperties.h
index 0a8d5d5..688bc6a 100644
--- a/include/strigi/classproperties.h
+++ b/include/strigi/classproperties.h
@@ -39,8 +39,8 @@ public:
     };
     ClassProperties();
     ClassProperties(const ClassProperties&);
-    ClassProperties(const Private&);
-    ClassProperties(const std::string& key);
+    explicit ClassProperties(const Private&);
+    explicit ClassProperties(const std::string& key);
     ~ClassProperties();
     const ClassProperties& operator=(const ClassProperties&);
     bool valid() const;
diff --git a/include/strigi/fieldproperties.h b/include/strigi/fieldproperties.h
index dc53703..f1a9f77 100644
--- a/include/strigi/fieldproperties.h
+++ b/include/strigi/fieldproperties.h
@@ -39,8 +39,8 @@ public:
     };
     FieldProperties();
     FieldProperties(const FieldProperties&);
-    FieldProperties(const Private&);
-    FieldProperties(const std::string& key);
+    explicit FieldProperties(const Private&);
+    explicit FieldProperties(const std::string& key);
     ~FieldProperties();
     const FieldProperties& operator=(const FieldProperties&);
     /**
diff --git a/include/strigi/fieldtypes.h b/include/strigi/fieldtypes.h
index e369ad4..8bc9669 100644
--- a/include/strigi/fieldtypes.h
+++ b/include/strigi/fieldtypes.h
@@ -69,7 +69,7 @@ private:
      * @param fieldname a (unique) name for what this field represents
      *   the same name should be used in .fieldproperties files in [] brackets
      */
-    RegisteredField(const std::string& key);
+    explicit RegisteredField(const std::string& key);
 public:
     /**
      * @brief Get the key for this field.
@@ -101,7 +101,7 @@ public:
      * primitive type, an array or an object of some
      * description.
      *
-     * It is up the the caller to keep track of the type of
+     * It is up the caller to keep track of the type of
      * the data that is pointed to.  The RegisteredField does
      * not take ownership of the data, and it the caller's
      * responsibility to ensure that any data allocated with
diff --git a/include/strigi/filelister.h b/include/strigi/filelister.h
index 5fe7f3e..ab1b6ef 100644
--- a/include/strigi/filelister.h
+++ b/include/strigi/filelister.h
@@ -50,7 +50,7 @@ private:
     class Private;
     Private* p;
 public:
-    FileLister(const Strigi::AnalyzerConfiguration* ic=0);
+    explicit FileLister(const Strigi::AnalyzerConfiguration* ic=0);
     ~FileLister();
 
     void startListing(const std::string& dir);
@@ -76,7 +76,7 @@ private:
     class Private;
     Private* p;
 public:
-    DirLister(const Strigi::AnalyzerConfiguration* ic=0);
+    explicit DirLister(const Strigi::AnalyzerConfiguration* ic=0);
     ~DirLister();
 
     void startListing(const std::string& dir);
diff --git a/include/strigi/streamanalyzer.h b/include/strigi/streamanalyzer.h
index 4074463..5a5ed0e 100644
--- a/include/strigi/streamanalyzer.h
+++ b/include/strigi/streamanalyzer.h
@@ -50,7 +50,7 @@ private:
     StreamAnalyzerPrivate* const p;
 
 public:
-    StreamAnalyzer(AnalyzerConfiguration& c);
+    explicit StreamAnalyzer(AnalyzerConfiguration& c);
     ~StreamAnalyzer();
     void setIndexWriter(IndexWriter& writer);
     signed char indexFile(const char *filepath);
diff --git a/include/strigi/variant.h b/include/strigi/variant.h
index f81b604..bb2ccab 100644
--- a/include/strigi/variant.h
+++ b/include/strigi/variant.h
@@ -40,13 +40,13 @@ private:
     VariantPrivate* const p;
 public:
     Variant();
-    Variant(bool v);
-    Variant(int32_t v);
-    Variant(uint32_t v);
-    Variant(const char* v);
-    Variant(const std::string& v);
-    Variant(const std::vector<std::string>& v);
-    Variant(const std::vector<std::vector<std::string> >& v);
+    explicit Variant(bool v);
+    explicit Variant(int32_t v);
+    explicit Variant(uint32_t v);
+    explicit Variant(const char* v);
+    explicit Variant(const std::string& v);
+    explicit Variant(const std::vector<std::string>& v);
+    explicit Variant(const std::vector<std::vector<std::string> >& v);
     Variant(const Variant& v);
     ~Variant();
     Type type() const;
diff --git a/lib/endanalyzers/arendanalyzer.h b/lib/endanalyzers/arendanalyzer.h
index 801964d..0a12f84 100644
--- a/lib/endanalyzers/arendanalyzer.h
+++ b/lib/endanalyzers/arendanalyzer.h
@@ -28,7 +28,7 @@ class ArEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const ArEndAnalyzerFactory* factory;
 public:
-    ArEndAnalyzer(const ArEndAnalyzerFactory* f)
+    explicit ArEndAnalyzer(const ArEndAnalyzerFactory* f)
         :factory(f) {}
 
     bool checkHeader(const char* header, int32_t headersize) const;
diff --git a/lib/endanalyzers/bmpendanalyzer.h b/lib/endanalyzers/bmpendanalyzer.h
index c829a5c..38e1109 100644
--- a/lib/endanalyzers/bmpendanalyzer.h
+++ b/lib/endanalyzers/bmpendanalyzer.h
@@ -28,7 +28,7 @@ class BmpEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const BmpEndAnalyzerFactory* factory;
 public:
-    BmpEndAnalyzer(const BmpEndAnalyzerFactory* f) :factory(f) {}
+    explicit BmpEndAnalyzer(const BmpEndAnalyzerFactory* f) :factory(f) {}
     bool checkHeader(const char* header, int32_t headersize) const;
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
     const char* name() const { return "BmpEndAnalyzer"; }
diff --git a/lib/endanalyzers/bz2endanalyzer.h b/lib/endanalyzers/bz2endanalyzer.h
index e88c158..e7266b2 100644
--- a/lib/endanalyzers/bz2endanalyzer.h
+++ b/lib/endanalyzers/bz2endanalyzer.h
@@ -28,7 +28,7 @@ class Bz2EndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const Bz2EndAnalyzerFactory* factory;
 public:
-    Bz2EndAnalyzer(const Bz2EndAnalyzerFactory* f)
+    explicit Bz2EndAnalyzer(const Bz2EndAnalyzerFactory* f)
         :factory(f) {}
 
     bool checkHeader(const char* header, int32_t headersize) const;
diff --git a/lib/endanalyzers/flacendanalyzer.h b/lib/endanalyzers/flacendanalyzer.h
index 535940e..f1bcf1f 100644
--- a/lib/endanalyzers/flacendanalyzer.h
+++ b/lib/endanalyzers/flacendanalyzer.h
@@ -33,7 +33,7 @@ class FlacEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const FlacEndAnalyzerFactory* factory;
 public:
-    FlacEndAnalyzer(const FlacEndAnalyzerFactory* f) :factory(f) {}
+    explicit FlacEndAnalyzer(const FlacEndAnalyzerFactory* f) :factory(f) {}
     bool checkHeader(const char* header, int32_t headersize) const;
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
     const char* name() const { return "FlacEndAnalyzer"; }
diff --git a/lib/endanalyzers/gzipendanalyzer.h b/lib/endanalyzers/gzipendanalyzer.h
index 51b9008..2793721 100644
--- a/lib/endanalyzers/gzipendanalyzer.h
+++ b/lib/endanalyzers/gzipendanalyzer.h
@@ -28,7 +28,7 @@ class GZipEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const GZipEndAnalyzerFactory* factory;
 public:
-    GZipEndAnalyzer(const GZipEndAnalyzerFactory* f)
+    explicit GZipEndAnalyzer(const GZipEndAnalyzerFactory* f)
         :factory(f) {}
 
     bool checkHeader(const char* header, int32_t headersize) const;
diff --git a/lib/endanalyzers/id3endanalyzer.cpp b/lib/endanalyzers/id3endanalyzer.cpp
index a453a39..c500715 100644
--- a/lib/endanalyzers/id3endanalyzer.cpp
+++ b/lib/endanalyzers/id3endanalyzer.cpp
@@ -342,7 +342,7 @@ ID3EndAnalyzer::checkHeader(const char* header, int32_t headersize) const {
   const unsigned char* usbuf = (const unsigned char*)header;
   int32_t i;
 
-  for(i=0; (header[i] == '\0') && (i<headersize); i++);
+  for(i=0; (header[i] == '\0') && (i<headersize); ++i);
   return (headersize>=6+i)
 	  && (
 	    (strncmp("ID3", header+i, 3) == 0	// check that it's ID3
@@ -411,7 +411,7 @@ class genre_number_parser {
         parse_string(genre);
     }
     /**
-     * wether or not parsing was successful
+     * whether or not parsing was successful
      */
     operator bool() {
         return success;
@@ -480,7 +480,7 @@ ID3EndAnalyzer::analyze(Strigi::AnalysisResult& indexable, Strigi::InputStream*
 	    string deunsyncbuf;
 	    if (unsync) {
 	      deunsyncbuf.reserve(size-1);
-	      for(int32_t i = 0; i<size-1; i++)
+	      for(int32_t i = 0; i<size-1; ++i)
 		if ( (i==0) || (p[11+i]!=0) || (p[10+i]!=0xff) )
 		  deunsyncbuf.push_back(p[11+i]);
 	      decoded_value = deunsyncbuf.c_str();
diff --git a/lib/endanalyzers/id3endanalyzer.h b/lib/endanalyzers/id3endanalyzer.h
index 293c993..337dcfd 100644
--- a/lib/endanalyzers/id3endanalyzer.h
+++ b/lib/endanalyzers/id3endanalyzer.h
@@ -30,7 +30,7 @@ class ID3EndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const ID3EndAnalyzerFactory* factory;
 public:
-    ID3EndAnalyzer(const ID3EndAnalyzerFactory* f) :factory(f) {}
+    explicit ID3EndAnalyzer(const ID3EndAnalyzerFactory* f) :factory(f) {}
     bool checkHeader(const char* header, int32_t headersize) const;
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
     const char* name() const { return "ID3EndAnalyzer"; }
diff --git a/lib/endanalyzers/lzmaendanalyzer.h b/lib/endanalyzers/lzmaendanalyzer.h
index cad65aa..7fb118a 100644
--- a/lib/endanalyzers/lzmaendanalyzer.h
+++ b/lib/endanalyzers/lzmaendanalyzer.h
@@ -28,7 +28,7 @@ class LzmaEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const LzmaEndAnalyzerFactory* factory;
 public:
-    LzmaEndAnalyzer(const LzmaEndAnalyzerFactory* f)
+    explicit LzmaEndAnalyzer(const LzmaEndAnalyzerFactory* f)
         :factory(f) {}
 
     bool checkHeader(const char* header, int32_t headersize) const;
diff --git a/lib/endanalyzers/mailendanalyzer.h b/lib/endanalyzers/mailendanalyzer.h
index 4c7d391..8d77420 100644
--- a/lib/endanalyzers/mailendanalyzer.h
+++ b/lib/endanalyzers/mailendanalyzer.h
@@ -28,7 +28,7 @@ class MailEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const MailEndAnalyzerFactory* factory;
 public:
-    MailEndAnalyzer(const MailEndAnalyzerFactory* f) :factory(f) {}
+    explicit MailEndAnalyzer(const MailEndAnalyzerFactory* f) :factory(f) {}
     bool checkHeader(const char* header, int32_t headersize) const;
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
     const char* name() const { return "MailEndAnalyzer"; }
diff --git a/lib/endanalyzers/mpegendanalyzer.h b/lib/endanalyzers/mpegendanalyzer.h
index 42b65e9..1d0a2f2 100644
--- a/lib/endanalyzers/mpegendanalyzer.h
+++ b/lib/endanalyzers/mpegendanalyzer.h
@@ -58,7 +58,7 @@ private:
 
 
 public:
-    MpegEndAnalyzer(const MpegEndAnalyzerFactory* f) :factory(f)
+    explicit MpegEndAnalyzer(const MpegEndAnalyzerFactory* f) :factory(f)
     {
         this->frame_rate_table[0] = 0.0;   /* Pad */
         //Official frame rates
diff --git a/lib/endanalyzers/odfendanalyzer.h b/lib/endanalyzers/odfendanalyzer.h
index f426c25..8da3137 100644
--- a/lib/endanalyzers/odfendanalyzer.h
+++ b/lib/endanalyzers/odfendanalyzer.h
@@ -36,7 +36,7 @@ public:
     Strigi::OdfMetaHelperAnalyzer metaHelper;
     Strigi::OdfContentHelperAnalyzer contentHelper;
     
-    OdfEndAnalyzer(const OdfEndAnalyzerFactory* f) :factory(f){};
+    explicit OdfEndAnalyzer(const OdfEndAnalyzerFactory* f) :factory(f){};
     bool checkHeader(const char* header, int32_t headersize) const;
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
     const char* name() const { return "OdfEndAnalyzer"; }
diff --git a/lib/endanalyzers/oleendanalyzer.h b/lib/endanalyzers/oleendanalyzer.h
index df89ce4..b94bc40 100644
--- a/lib/endanalyzers/oleendanalyzer.h
+++ b/lib/endanalyzers/oleendanalyzer.h
@@ -64,7 +64,7 @@ private:
     std::string getStreamString(Strigi::InputStream*) const;
     bool tryFIB(Strigi::AnalysisResult& ar, Strigi::InputStream* in);
 public:
-    OleEndAnalyzer(const OleEndAnalyzerFactory* const f) :factory(f) {}
+    explicit OleEndAnalyzer(const OleEndAnalyzerFactory* const f) :factory(f) {}
     bool checkHeader(const char* header, int32_t headersize) const;
     bool tryPropertyStream(Strigi::AnalysisResult& idx, Strigi::InputStream* s);
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
diff --git a/lib/endanalyzers/pdfendanalyzer.h b/lib/endanalyzers/pdfendanalyzer.h
index b157bdb..c72fc71 100644
--- a/lib/endanalyzers/pdfendanalyzer.h
+++ b/lib/endanalyzers/pdfendanalyzer.h
@@ -40,7 +40,7 @@ private:
     Strigi::StreamStatus handle(Strigi::InputStream* s);
     Strigi::StreamStatus handle(const std::string& s);
 public:
-    PdfEndAnalyzer(const PdfEndAnalyzerFactory* f);
+    explicit PdfEndAnalyzer(const PdfEndAnalyzerFactory* f);
 };
 
 class PdfEndAnalyzerFactory : public Strigi::StreamEndAnalyzerFactory {
diff --git a/lib/endanalyzers/pngendanalyzer.h b/lib/endanalyzers/pngendanalyzer.h
index 9144758..066aaac 100644
--- a/lib/endanalyzers/pngendanalyzer.h
+++ b/lib/endanalyzers/pngendanalyzer.h
@@ -42,7 +42,7 @@ private:
     signed char addMetaData(const std::string& key, Strigi::AnalysisResult& as,
         Strigi::InputStream* in);
 public:
-    PngEndAnalyzer(const PngEndAnalyzerFactory* f);
+    explicit PngEndAnalyzer(const PngEndAnalyzerFactory* f);
 };
 
 class PngEndAnalyzerFactory : public Strigi::StreamEndAnalyzerFactory {
diff --git a/lib/endanalyzers/rpmendanalyzer.h b/lib/endanalyzers/rpmendanalyzer.h
index fdaf0f4..b5ccbd6 100644
--- a/lib/endanalyzers/rpmendanalyzer.h
+++ b/lib/endanalyzers/rpmendanalyzer.h
@@ -28,7 +28,7 @@ class RpmEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const RpmEndAnalyzerFactory* factory;
 public:
-    RpmEndAnalyzer(const RpmEndAnalyzerFactory* f)
+    explicit RpmEndAnalyzer(const RpmEndAnalyzerFactory* f)
         :factory(f) {}
 
     bool checkHeader(const char* header, int32_t headersize) const;
diff --git a/lib/endanalyzers/sdfendanalyzer.h b/lib/endanalyzers/sdfendanalyzer.h
index f6ab67f..56b1d77 100644
--- a/lib/endanalyzers/sdfendanalyzer.h
+++ b/lib/endanalyzers/sdfendanalyzer.h
@@ -29,7 +29,7 @@ class SdfEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const SdfEndAnalyzerFactory* factory;
 public:
-    SdfEndAnalyzer(const SdfEndAnalyzerFactory* f) :factory(f) {}
+    explicit SdfEndAnalyzer(const SdfEndAnalyzerFactory* f) :factory(f) {}
     bool checkHeader(const char* header, int32_t headersize) const;
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
     const char* name() const { return "SdfEndAnalyzer"; }
diff --git a/lib/endanalyzers/tarendanalyzer.h b/lib/endanalyzers/tarendanalyzer.h
index 875d560..28bedf0 100644
--- a/lib/endanalyzers/tarendanalyzer.h
+++ b/lib/endanalyzers/tarendanalyzer.h
@@ -28,7 +28,7 @@ class TarEndAnalyzer : public Strigi::StreamEndAnalyzer {
 private:
     const TarEndAnalyzerFactory* factory;
 public:
-    TarEndAnalyzer(const TarEndAnalyzerFactory* f)
+    explicit TarEndAnalyzer(const TarEndAnalyzerFactory* f)
         :factory(f) {}
 
     bool checkHeader(const char* header, int32_t headersize) const;
diff --git a/lib/endanalyzers/zipendanalyzer.h b/lib/endanalyzers/zipendanalyzer.h
index 3d87217..653645d 100644
--- a/lib/endanalyzers/zipendanalyzer.h
+++ b/lib/endanalyzers/zipendanalyzer.h
@@ -28,7 +28,7 @@ class ZipEndAnalyzer : public Strigi::StreamEndAnalyzer {
 public:
     const ZipEndAnalyzerFactory* const factory;
 
-    ZipEndAnalyzer(const ZipEndAnalyzerFactory* f) :factory(f) {}
+    explicit ZipEndAnalyzer(const ZipEndAnalyzerFactory* f) :factory(f) {}
     bool checkHeader(const char* header, int32_t headersize) const;
     signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
     const char* name() const { return "ZipEndAnalyzer"; }
diff --git a/lib/eventanalyzers/mimeeventanalyzer.h b/lib/eventanalyzers/mimeeventanalyzer.h
index d0d2506..fd28b7b 100644
--- a/lib/eventanalyzers/mimeeventanalyzer.h
+++ b/lib/eventanalyzers/mimeeventanalyzer.h
@@ -39,7 +39,7 @@ private:
     void handleData(const char* data, uint32_t length);
     bool isReadyWithStream();
 public:
-    MimeEventAnalyzer(const MimeEventAnalyzerFactory*);
+    explicit MimeEventAnalyzer(const MimeEventAnalyzerFactory*);
     ~MimeEventAnalyzer();
 };
 
diff --git a/lib/eventthroughanalyzer.h b/lib/eventthroughanalyzer.h
index 1b45312..b866402 100644
--- a/lib/eventthroughanalyzer.h
+++ b/lib/eventthroughanalyzer.h
@@ -50,7 +50,7 @@ private:
     void handleEnd();
     const char* name() const { return "EventThroughAnalyzer"; }
 public:
-    EventThroughAnalyzer(std::vector<StreamEventAnalyzer*>& e)
+    explicit EventThroughAnalyzer(std::vector<StreamEventAnalyzer*>& e)
             : event(e), datastream(0), result(0), ready(true){}
     ~EventThroughAnalyzer();
 };
diff --git a/lib/fieldpropertiesdb.cpp b/lib/fieldpropertiesdb.cpp
index 79264ce..07d5204 100644
--- a/lib/fieldpropertiesdb.cpp
+++ b/lib/fieldpropertiesdb.cpp
@@ -291,30 +291,30 @@ FieldPropertiesDb::Private::addEssentialProperties() {
 
     props.typeuri = FieldRegister::datetimeType;
     props.uri = FieldRegister::mtimeFieldName;
-    properties[FieldRegister::mtimeFieldName] = props;
+    properties[FieldRegister::mtimeFieldName] = FieldProperties(props);
 
     props.typeuri = FieldRegister::integerType;
     props.uri = FieldRegister::sizeFieldName;
-    properties[FieldRegister::sizeFieldName] = props;
+    properties[FieldRegister::sizeFieldName] = FieldProperties(props);
 
     props.uri = FieldRegister::embeddepthFieldName;
-    properties[FieldRegister::embeddepthFieldName] = props;
+    properties[FieldRegister::embeddepthFieldName] = FieldProperties(props);
 
     props.typeuri = FieldRegister::stringType;
     props.uri = FieldRegister::pathFieldName;
     props.tokenized = false; // should not be tokenized: needed for retrieval 
-    properties[FieldRegister::pathFieldName] = props;
+    properties[FieldRegister::pathFieldName] = FieldProperties(props);
 
     props.uri = FieldRegister::filenameFieldName;
     props.tokenized = true;
-    properties[FieldRegister::filenameFieldName] = props;
+    properties[FieldRegister::filenameFieldName] = FieldProperties(props);
 
     props.uri = FieldRegister::mimetypeFieldName;
-    properties[FieldRegister::mimetypeFieldName] = props;
+    properties[FieldRegister::mimetypeFieldName] = FieldProperties(props);
 
     props.uri = FieldRegister::parentLocationFieldName;
     props.tokenized = false; // should not be tokenized: needed for retrieval
-    properties[FieldRegister::parentLocationFieldName] = props;
+    properties[FieldRegister::parentLocationFieldName] = FieldProperties(props);
 }
 void
 FieldPropertiesDb::Private::loadProperties(const string& dir) {
@@ -751,7 +751,7 @@ FieldPropertiesDb::Private::endElementNsSAX2Func(void *ctx,
 void
 FieldPropertiesDb::Private::storeProperties(FieldProperties::Private& p) {
     if (p.uri.size()) {
-        properties[p.uri] = p;
+        properties[p.uri] = FieldProperties(p);
     }
     p.clear();
 }
@@ -773,14 +773,14 @@ FieldPropertiesDb::addField(const std::string& key, const std::string& type,
     if (parent.size()) {
         props.parentUris.push_back(parent);
     }
-    p->properties[key] = props;
+    p->properties[key] = FieldProperties(props);
 }
 void
 FieldPropertiesDb::addField(const std::string& key) {
     FieldProperties::Private props;
     props.uri = key;
     props.typeuri = FieldRegister::stringType;
-    p->properties[key] = props;
+    p->properties[key] = FieldProperties(props);
 }
 void
 FieldProperties::Private::clear() {
diff --git a/lib/helperanalyzers/odfcontenthelperanalyzer.cpp b/lib/helperanalyzers/odfcontenthelperanalyzer.cpp
index d2a0a72..df3352a 100644
--- a/lib/helperanalyzers/odfcontenthelperanalyzer.cpp
+++ b/lib/helperanalyzers/odfcontenthelperanalyzer.cpp
@@ -25,7 +25,6 @@
 #include <cstring>
 #include <string>
 
-#include <strigi/analysisresult.h>
 #include <strigi/fieldtypes.h>
 #include "../rdfnamespaces.h"
 
diff --git a/lib/helperanalyzers/odfmetahelperanalyzer.cpp b/lib/helperanalyzers/odfmetahelperanalyzer.cpp
index 3409707..6b53be0 100644
--- a/lib/helperanalyzers/odfmetahelperanalyzer.cpp
+++ b/lib/helperanalyzers/odfmetahelperanalyzer.cpp
@@ -27,7 +27,6 @@
 #include <string>
 #include <iostream>
 
-#include <strigi/analysisresult.h>
 #include <strigi/fieldtypes.h>
 #include "../rdfnamespaces.h"
 
diff --git a/lib/libstreamanalyzer.pc.cmake b/lib/libstreamanalyzer.pc.cmake
index bd13339..38c0ccb 100644
--- a/lib/libstreamanalyzer.pc.cmake
+++ b/lib/libstreamanalyzer.pc.cmake
@@ -1,3 +1,22 @@
+# This file is part of Strigi Desktop Search
+#
+# Copyright (C) 2007 Jos van den Oever <jos@vandenoever.info>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
 prefix=${CMAKE_INSTALL_PREFIX}
 exec_prefix=${CMAKE_INSTALL_PREFIX}/bin
 libdir=${LIB_DESTINATION}
diff --git a/lib/lineanalyzers/m3ustreamanalyzer.h b/lib/lineanalyzers/m3ustreamanalyzer.h
index 9033f14..d3fe71d 100644
--- a/lib/lineanalyzers/m3ustreamanalyzer.h
+++ b/lib/lineanalyzers/m3ustreamanalyzer.h
@@ -42,7 +42,7 @@ private:
     std::string constructAbsolutePath(const std::string& relative) const;
 
 public:
-    M3uLineAnalyzer(const M3uLineAnalyzerFactory* f) : factory(f) {}
+    explicit M3uLineAnalyzer(const M3uLineAnalyzerFactory* f) : factory(f) {}
     ~M3uLineAnalyzer() {}
 
     const char* name() const { 
diff --git a/lib/lineanalyzers/odfmimetypelineanalyzer.h b/lib/lineanalyzers/odfmimetypelineanalyzer.h
index c53aa19..0bb81aa 100644
--- a/lib/lineanalyzers/odfmimetypelineanalyzer.h
+++ b/lib/lineanalyzers/odfmimetypelineanalyzer.h
@@ -40,7 +40,7 @@ public:
 
 class OdfMimeTypeLineAnalyzer : public Strigi::StreamLineAnalyzer {
 public:
-    OdfMimeTypeLineAnalyzer(const OdfMimeTypeLineAnalyzerFactory *factory);
+    explicit OdfMimeTypeLineAnalyzer(const OdfMimeTypeLineAnalyzerFactory *factory);
 
     const char* name() const {
         return "OdfMimeTypeLineAnalyzer";
diff --git a/lib/lineeventanalyzer.h b/lib/lineeventanalyzer.h
index 5c67eac..ccd9043 100644
--- a/lib/lineeventanalyzer.h
+++ b/lib/lineeventanalyzer.h
@@ -57,7 +57,7 @@ private:
     void emitData(const char* data, uint32_t length);
     void initEncoding(std::string encoding);
 public:
-    LineEventAnalyzer(std::vector<StreamLineAnalyzer*>&s);
+    explicit LineEventAnalyzer(std::vector<StreamLineAnalyzer*>&s);
     ~LineEventAnalyzer();
 };
 
diff --git a/lib/logging.h b/lib/logging.h
index 8a42795..c9e34c6 100644
--- a/lib/logging.h
+++ b/lib/logging.h
@@ -44,4 +44,4 @@
 #define slog(x) (void)
 #endif
 
-#endif
\ No newline at end of file
+#endif
diff --git a/lib/rdfnamespaces.h b/lib/rdfnamespaces.h
index 9aad41d..aa35714 100644
--- a/lib/rdfnamespaces.h
+++ b/lib/rdfnamespaces.h
@@ -18,8 +18,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef RDFNAMESAPCES
-#define RDFNAMESPACES
+#ifndef RDFNAMESPACES_H
+#define RDFNAMESPACES_H
 
 // This is a list of the most often encountered rdf namespaces used by analyzers
 // For internal use ONLY and should not be installed
diff --git a/lib/saxeventanalyzer.h b/lib/saxeventanalyzer.h
index 3bb9101..b5eec45 100644
--- a/lib/saxeventanalyzer.h
+++ b/lib/saxeventanalyzer.h
@@ -40,7 +40,7 @@ private:
     void handleData(const char* data, uint32_t length);
     bool isReadyWithStream();
 public:
-    SaxEventAnalyzer(std::vector<StreamSaxAnalyzer*>&s);
+    explicit SaxEventAnalyzer(std::vector<StreamSaxAnalyzer*>&s);
     ~SaxEventAnalyzer();
 };
 
diff --git a/lib/throughanalyzers/oggthroughanalyzer.h b/lib/throughanalyzers/oggthroughanalyzer.h
index c28853a..c3530a1 100644
--- a/lib/throughanalyzers/oggthroughanalyzer.h
+++ b/lib/throughanalyzers/oggthroughanalyzer.h
@@ -35,7 +35,7 @@ private:
     Strigi::AnalysisResult* indexable;
     const OggThroughAnalyzerFactory* factory;
 public:
-    OggThroughAnalyzer(const OggThroughAnalyzerFactory* f) :factory(f) {}
+    explicit OggThroughAnalyzer(const OggThroughAnalyzerFactory* f) :factory(f) {}
     ~OggThroughAnalyzer() {}
     void setIndexable(Strigi::AnalysisResult*);
     Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
diff --git a/lib/xmlparser/xmlstream.h b/lib/xmlparser/xmlstream.h
index 083e55e..6b48eb5 100644
--- a/lib/xmlparser/xmlstream.h
+++ b/lib/xmlparser/xmlstream.h
@@ -35,7 +35,7 @@ private:
     class Private;
     Private* p;
 public:
-    XMLStream(const std::string& xml);
+    explicit XMLStream(const std::string& xml);
     ~XMLStream();
     void setFromAttribute(bool&, const char*);
     void setFromAttribute(int&, const char*);
@@ -82,7 +82,7 @@ public:
     std::list<SimpleNode> nodes;
     std::string text;
 
-    SimpleNode(const std::string& xml);
+    explicit SimpleNode(const std::string& xml);
 };
 
 
diff --git a/plugins/endplugins/ffmpegendanalyzer.cpp b/plugins/endplugins/ffmpegendanalyzer.cpp
index 25e2a9a..f219912 100644
--- a/plugins/endplugins/ffmpegendanalyzer.cpp
+++ b/plugins/endplugins/ffmpegendanalyzer.cpp
@@ -377,7 +377,7 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) {
     ar.addValue(factory->typeProperty, NFO "Video");
   }
 
-  for(uint32_t i=0; i<fc->nb_streams; i++) {
+  for(uint32_t i=0; i<fc->nb_streams; ++i) {
     const AVStream &stream = *fc->streams[i];
     const AVCodecContext &codec = *stream.codec;
     
@@ -394,9 +394,9 @@ FFMPEGEndAnalyzer::analyze(AnalysisResult& ar, ::InputStream* in) {
       }
 
 #if (LIBAVUTIL_VERSION_MAJOR < 51)
-      //FIXME we must stop using the deprecated fuction av_metadata_get and use
+      //FIXME we must stop using the deprecated function av_metadata_get and use
       // av_dict_get once we are able to detect the version of FFMpeg being used
-      // using version macros. same goes for all occurences of this function.
+      // using version macros. same goes for all occurrences of this function.
       AVMetadataTag *entry = av_metadata_get(stream.metadata, "language", NULL, 0);
 #else
       AVDictionaryEntry *entry = av_dict_get(stream.metadata, "language", NULL, 0);
diff --git a/plugins/eventplugins/SHA1.h b/plugins/eventplugins/SHA1.h
index 47c2558..d78bbfc 100644
--- a/plugins/eventplugins/SHA1.h
+++ b/plugins/eventplugins/SHA1.h
@@ -115,10 +115,7 @@
 #define SHA1_WIPE_VARIABLES
 #endif
 
-#if defined(SHA1_HAS_TCHAR)
-#include <tchar.h>
-#else
-#ifdef _MSC_VER
+#if defined(SHA1_HAS_TCHAR) || defined(_MSC_VER)
 #include <tchar.h>
 #else
 #ifndef TCHAR
@@ -136,7 +133,6 @@
 #define _sntprintf snprintf
 #endif
 #endif
-#endif
 
 // Fallback, if no 64-bit support
 #ifndef _fseeki64
diff --git a/plugins/indexers/cluceneindexer/cluceneindexreader.cpp b/plugins/indexers/cluceneindexer/cluceneindexreader.cpp
index 6e0ea36..17738b2 100644
--- a/plugins/indexers/cluceneindexer/cluceneindexreader.cpp
+++ b/plugins/indexers/cluceneindexer/cluceneindexreader.cpp
@@ -310,11 +310,11 @@ CLuceneIndexReader::Private::createSingleFieldQuery(const string& field,
           q = _CLNEW TermQuery(t);
           break;
     case Strigi::Query::Contains:
-          t = createWildCardTerm(fieldname.c_str(), "*" + val + "*");
+          t = createWildCardTerm(fieldname.c_str(), '*' + val + '*');
           q = _CLNEW WildcardQuery(t);
           break;
     case Strigi::Query::StartsWith:
-          t = createWildCardTerm(fieldname.c_str(), val + "*");
+          t = createWildCardTerm(fieldname.c_str(), val + '*');
           q = _CLNEW WildcardQuery(t);
           break;
     case Strigi::Query::Equals:
diff --git a/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp b/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp
index 8658180..b340db3 100644
--- a/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp
+++ b/plugins/indexers/cluceneindexer/cluceneindexwriter.cpp
@@ -270,7 +270,7 @@ CLuceneIndexWriter::deleteEntry(const string& entry,
 }
 {
     // delete all deeper nested files
-    wstring v = utf8toucs2(entry+"/");
+    wstring v = utf8toucs2(entry + '/');
     Term* t = _CLNEW Term(parentlocation(), v.c_str());
     PrefixFilter* filter = _CLNEW PrefixFilter(t);
     BitSet* b = filter->bits(reader);
@@ -372,58 +372,6 @@ CLuceneIndexWriter::cleanUp() {
     if (!locked) {
         return;
     }
-    /*
-    //this is a hack and will not work with new versions of the index..
-        //furthermore, segmentinfos is a private class.
-    lucene::index::SegmentInfos infos;
-    try {
-        //Have SegmentInfos read the segments file in directory
-        infos.read(directory);
-    } catch(...) {
-        lock->release();
-        return; //todo: this may suggest an error...
-    }
-    lock->release();
-
-    int i;
-    set<string> segments;
-    for (i = 0; i < infos.size(); i++) {
-            lucene::index::SegmentInfo* info = infos.info(i);
-            segments.insert(info->name);
-    }
-
-    char** files = directory->list();
-    char tmp[CL_MAX_PATH];
-    for (i = 0; files[i] != NULL; ++i) {
-        char* file = files[i];
-
-        int fileLength = strlen(file);
-        if ( fileLength < 6 ) {
-            continue;
-        }
-
-        if (strncmp(file,"segments", 8) == 0
-                || strncmp(file, "deletable", 9) == 0) {
-            continue;
-        }
-        if (!isLuceneFile(file)) {
-            continue;
-        }
-
-        strcpy(tmp, file);
-        tmp[fileLength-4] = '\0';
-
-        if (segments.find(tmp) != segments.end()) {
-            continue;
-        }
-
-        directory->deleteFile(file, false);
-    }
-    for (i = 0; files[i] != NULL; i++) {
-        _CLDELETE_CaARRAY(files[i]);
-    }
-    _CLDELETE_ARRAY(files);
-    */
 }
 
 void
diff --git a/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp b/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp
index 2e428a2..d39505f 100644
--- a/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp
+++ b/plugins/indexers/cluceneindexer/jsgzipcompressstream.cpp
@@ -17,8 +17,8 @@
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
-#include <CLucene/StdHeader.h>
 #include "jsgzipcompressstream.h"
+#include <CLucene/StdHeader.h>
 #include <CLucene/util/jstreamsconfig.h>
 #include <zlib.h>
 
diff --git a/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp b/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp
index 9b1ff75..836c653 100644
--- a/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp
+++ b/plugins/indexers/cluceneindexer/tests/CLuceneTest.cpp
@@ -1,3 +1,22 @@
+/* This file is part of Strigi Desktop Search
+ *
+ * Copyright (C) 2006 Jos van den Oever <jos@vandenoever.info>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
 #include <strigi/strigiconfig.h>
 #include "compat.h"
 #include "indexpluginloader.h"
diff --git a/plugins/indexers/cluceneindexer/timeofday.h b/plugins/indexers/cluceneindexer/timeofday.h
index 7c8bb7e..97a8c41 100644
--- a/plugins/indexers/cluceneindexer/timeofday.h
+++ b/plugins/indexers/cluceneindexer/timeofday.h
@@ -1,22 +1,23 @@
-/*
-* Defines gettimeofday
-*
-* Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei@gmail.com>
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+/**
+ * Defines gettimeofday
+ *
+ * Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
 
 #include "config.h"
 #include <errno.h>
diff --git a/plugins/indexers/clucenengindexer/cluceneindexreader.cpp b/plugins/indexers/clucenengindexer/cluceneindexreader.cpp
index 0274329..8e20847 100644
--- a/plugins/indexers/clucenengindexer/cluceneindexreader.cpp
+++ b/plugins/indexers/clucenengindexer/cluceneindexreader.cpp
@@ -476,8 +476,8 @@ CLuceneIndexReader::getDocuments(const std::vector<std::string>& fullFields,
         doc.resize(fullFields.size());
 
         const Document::FieldsType& fields = *d.getFields();
-        for ( Document::FieldsType::const_iterator itr = fields.begin();
-              itr != fields.end(); itr++ ) {
+        for (Document::FieldsType::const_iterator itr = fields.begin();
+             itr != fields.end(); ++itr) {
             Field* field = *itr;
             string name(wchartoutf8(field->name()));
             for (uint j = 0; j < fullFields.size(); ++j) {
@@ -546,8 +546,8 @@ CLuceneIndexReader::getHits(const Strigi::Query& q,
         doc.resize(fields.size());
 
         const Document::FieldsType fields = *d->getFields();
-        for ( Document::FieldsType::const_iterator itr = fields.begin();
-              itr != fields.end(); itr++ ) {
+        for (Document::FieldsType::const_iterator itr = fields.begin();
+                 itr != fields.end(); ++itr) {
             Field* field = *itr;
 
             string name(wchartoutf8(field->name()));
diff --git a/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp b/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp
index 3ba6eeb..b0a9ff7 100644
--- a/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp
+++ b/plugins/indexers/clucenengindexer/cluceneindexwriter.cpp
@@ -229,7 +229,7 @@ CLuceneIndexWriter::deleteEntry(const string& entry, lucene::index::IndexWriter*
 }
 {
     // delete all deeper nested files
-    wstring v = utf8toucs2(entry+"/");
+    wstring v = utf8toucs2(entry + '/');
     Term* t(_CLNEW Term(parentlocation(), v.c_str()));
     PrefixFilter* filter = _CLNEW PrefixFilter(t);
     BitSet* b = filter->bits(reader);
@@ -248,7 +248,7 @@ void
 CLuceneIndexWriter::deleteAllEntries() {
     lucene::index::IndexReader* reader = manager->checkReader();
     if ( reader != NULL ){
-      for ( int32_t i=0;i<reader->maxDoc();i++ ){
+      for ( int32_t i=0;i<reader->maxDoc(); ++i) {
         reader->deleteDocument(i);
       }
       reader->flush();
diff --git a/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp b/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp
index e2b4e1c..5937d3c 100644
--- a/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp
+++ b/plugins/indexers/clucenengindexer/indexdump/indexdump.cpp
@@ -48,9 +48,8 @@ t2a(const TCHAR* t) {
 void
 docdump(Document* doc) {
     Document::FieldsType fields = doc->getFields();
-    for ( Document::FieldsType::iterator itr = fields.begin();
-          itr != fields.end();
-          itr++ ){
+    for (Document::FieldsType::iterator itr = fields.begin();
+             itr != fields.end(); ++itr) {
         TCHAR* s = (*itr)->toString();
         printf("%s\n", t2a(s).c_str());
         _CLDELETE_CARRAY(s);
diff --git a/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp b/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp
index f5e1b7f..19d69b7 100644
--- a/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp
+++ b/plugins/indexers/clucenengindexer/tests/CLuceneTest.cpp
@@ -1,3 +1,22 @@
+/* This file is part of Strigi Desktop Search
+ *
+ * Copyright (C) 2006 Jos van den Oever <jos@vandenoever.info>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
 #include <strigi/strigiconfig.h>
 #include "indexpluginloader.h"
 #include "indexmanager.h"
diff --git a/plugins/indexers/clucenengindexer/timeofday.h b/plugins/indexers/clucenengindexer/timeofday.h
index 7c8bb7e..97a8c41 100644
--- a/plugins/indexers/clucenengindexer/timeofday.h
+++ b/plugins/indexers/clucenengindexer/timeofday.h
@@ -1,22 +1,23 @@
-/*
-* Defines gettimeofday
-*
-* Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei@gmail.com>
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+/**
+ * Defines gettimeofday
+ *
+ * Based on timeval.h Copyright (c) by Wu Yongwei <wuyongwei@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
 
 #include "config.h"
 #include <errno.h>
diff --git a/plugins/lineplugins/deblineanalyzer.h b/plugins/lineplugins/deblineanalyzer.h
index 25b40b0..e2b3cd9 100644
--- a/plugins/lineplugins/deblineanalyzer.h
+++ b/plugins/lineplugins/deblineanalyzer.h
@@ -36,7 +36,7 @@ private:
     unsigned int finished;
     Strigi::AnalysisResult* result;
 public:
-    DebLineAnalyzer(const DebLineAnalyzerFactory* f) : factory(f) {}
+    explicit DebLineAnalyzer(const DebLineAnalyzerFactory* f) : factory(f) {}
 };
 
 class DebLineAnalyzerFactory : public Strigi::StreamLineAnalyzerFactory {
diff --git a/plugins/throughplugins/authroughanalyzer.h b/plugins/throughplugins/authroughanalyzer.h
index 18ae6d6..75335d1 100644
--- a/plugins/throughplugins/authroughanalyzer.h
+++ b/plugins/throughplugins/authroughanalyzer.h
@@ -36,7 +36,7 @@ private:
     Strigi::AnalysisResult* analysisResult;
     const AuThroughAnalyzerFactory* factory;
 public:
-    AuThroughAnalyzer(const AuThroughAnalyzerFactory* f) :factory(f) {}
+    explicit AuThroughAnalyzer(const AuThroughAnalyzerFactory* f) :factory(f) {}
     ~AuThroughAnalyzer() {}
     void setIndexable(Strigi::AnalysisResult* i);
     Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
diff --git a/plugins/throughplugins/dummy.cpp b/plugins/throughplugins/dummy.cpp
index 2bfadc3..73d9ffb 100644
--- a/plugins/throughplugins/dummy.cpp
+++ b/plugins/throughplugins/dummy.cpp
@@ -1,3 +1,22 @@
+/* This file is part of Strigi Desktop Search
+ *
+ * Copyright (C) 2008 Sebastian Trueg<sebastian@trueg.de>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
 #include <strigi/streamthroughanalyzer.h>
 #include <strigi/analyzerplugin.h>
 
diff --git a/plugins/throughplugins/pcxthroughanalyzer.h b/plugins/throughplugins/pcxthroughanalyzer.h
index a16fb5e..cde824a 100644
--- a/plugins/throughplugins/pcxthroughanalyzer.h
+++ b/plugins/throughplugins/pcxthroughanalyzer.h
@@ -30,7 +30,7 @@ private:
     Strigi::AnalysisResult* indexable;
     const PcxThroughAnalyzerFactory* factory;
 public:
-    PcxThroughAnalyzer(const PcxThroughAnalyzerFactory* f) :factory(f) {}
+    explicit PcxThroughAnalyzer(const PcxThroughAnalyzerFactory* f) :factory(f) {}
     ~PcxThroughAnalyzer() {}
     void setIndexable(Strigi::AnalysisResult*);
     Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
-- 
1.8.4.2