summaryrefslogtreecommitdiff
path: root/src/htsfilters.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-23 21:33:43 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-23 21:33:43 +0000
commitcefcc0426613cc761373e785980c87c77f8a8cb5 (patch)
treee64653268bcb93fc50bf23d22e38799c5bb31adc /src/htsfilters.c
parent6ba50a2001bcfa1b467f69985a002fc064d8c807 (diff)
"const correctness" cleanup
added the following default flags: -Wformat -Wformat-security -Wmultichar -Wwrite-strings fixed several other warnings
Diffstat (limited to 'src/htsfilters.c')
-rw-r--r--src/htsfilters.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/htsfilters.c b/src/htsfilters.c
index 855cc59..ad879f4 100644
--- a/src/htsfilters.c
+++ b/src/htsfilters.c
@@ -54,7 +54,7 @@ Please visit our Website: http://www.httrack.com
// optionnel: taille à contrôller (ou numéro, etc) en pointeur
// (en de détection de *size, la taille limite est écrite par dessus *size)
// exemple: +-*.gif*[<5] == supprimer GIF si <5KB
-int fa_strjoker(int type, char **filters, int nfil, char *nom, LLint * size,
+int fa_strjoker(int type, char **filters, int nfil, const char *nom, LLint * size,
int *size_flag, int *depth) {
int verdict = 0; // on sait pas
int i;
@@ -101,7 +101,7 @@ int fa_strjoker(int type, char **filters, int nfil, char *nom, LLint * size,
// cet algo est 'un peu' récursif mais ne consomme pas trop de tm
// * = toute lettre
// --?-- : spécifique à HTTrack et aux ?
-HTS_INLINE char *strjoker(char *chaine, char *joker, LLint * size,
+HTS_INLINE const char *strjoker(const char *chaine, const char *joker, LLint * size,
int *size_flag) {
//int err=0;
if (strnotempty(joker) == 0) { // fin de chaine joker
@@ -262,7 +262,7 @@ HTS_INLINE char *strjoker(char *chaine, char *joker, LLint * size,
{
int i, max;
- char *adr;
+ const char *adr;
// la chaine doit se terminer exactement
if (cut) {
@@ -335,8 +335,8 @@ HTS_INLINE char *strjoker(char *chaine, char *joker, LLint * size,
// exemple: find dans un texte de strcpybuff(*[A-Z,a-z],"*[0-9]"); va rechercher la première occurence
// d'un strcpy sur une variable ayant un nom en lettres et copiant une chaine de chiffres
// ATTENTION!! Eviter les jokers en début, où gare au temps machine!
-char *strjokerfind(char *chaine, char *joker) {
- char *adr;
+const char *strjokerfind(const char *chaine, const char *joker) {
+ const char *adr;
while(*chaine) {
if ((adr = strjoker(chaine, joker, NULL, NULL))) { // ok trouvé