VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-06-05 13:50:55 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-06-17 15:50:39 +0200
commitd4e95293d9ee74ca9a1003317597686509500bb7 (patch)
treedd9e744781feda99135513d55af6385073aad298 /src/Common
parent76d3bc631eff60841026f2526d69f6d661d218a3 (diff)
downloadVeraCrypt-d4e95293d9ee74ca9a1003317597686509500bb7.tar.gz
VeraCrypt-d4e95293d9ee74ca9a1003317597686509500bb7.zip
Windows: fix compiler warnings
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Language.c4
-rw-r--r--src/Common/Xml.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Common/Language.c b/src/Common/Language.c
index f03a4e54..cb0178d9 100644
--- a/src/Common/Language.c
+++ b/src/Common/Language.c
@@ -361,9 +361,11 @@ BOOL LoadLanguageFile ()
header = headerPtr;
if (header == NULL) return FALSE;
+ header--;
do
{
+ header++;
if (sscanf (header, "#define %127s %d", key, &intKey) == 2)
{
WCHAR *str = GetString (key);
@@ -372,7 +374,7 @@ BOOL LoadLanguageFile ()
AddDictionaryEntry (NULL, intKey, str);
}
- } while ((header = strchr (header, '\n') + 1) != (char *) 1);
+ } while ((header = strchr (header, '\n')) != NULL);
free (headerPtr);
}
diff --git a/src/Common/Xml.c b/src/Common/Xml.c
index d733dac1..6e6f8724 100644
--- a/src/Common/Xml.c
+++ b/src/Common/Xml.c
@@ -128,9 +128,10 @@ char *XmlGetNodeText (char *xmlNode, char *xmlText, int xmlTextSize)
if (t[0] != '<')
return NULL;
- t = strchr (t, '>') + 1;
- if (t == (char *)1) return NULL;
+ t = strchr (t, '>');
+ if (t == NULL) return NULL;
+ t++;
e = strchr (e, '<');
if (e == NULL) return NULL;