summaryrefslogtreecommitdiff
path: root/compiler/ncon.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-12-01 17:02:08 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-12-01 17:02:08 +0000
commit4df0af54aefd58a9411c3ebe37eea7d99dc41855 (patch)
treecf19f45e0a4ef126c91246943d8db4e1e098495f /compiler/ncon.pas
parentaf02550d1078e3e48137ee74be2a5ede19b19d52 (diff)
downloadfpc-4df0af54aefd58a9411c3ebe37eea7d99dc41855.tar.gz
* fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@26161 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncon.pas')
-rw-r--r--compiler/ncon.pas10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/ncon.pas b/compiler/ncon.pas
index 2b38e9ef4b..ddcb98e181 100644
--- a/compiler/ncon.pas
+++ b/compiler/ncon.pas
@@ -1071,7 +1071,7 @@ implementation
pw:=pcompilerwidestring(value_str);
l2:=len;
l:=UnicodeToUtf8(nil,0,PUnicodeChar(pw^.data),l2);
- getmem(pc,l);
+ getmem(pc,l);
UnicodeToUtf8(pc,l,PUnicodeChar(pw^.data),l2);
len:=l-1;
donewidestring(pw);
@@ -1086,7 +1086,7 @@ implementation
value_str:=pc;
end;
end
- else
+ else
if (tstringdef(def).stringtype = st_ansistring) and
not(cst_type in [cst_widestring,cst_unicodestring]) then
begin
@@ -1100,8 +1100,10 @@ implementation
cp2:=current_settings.sourcecodepage;
end
else if (cst_type in [cst_shortstring,cst_conststring,cst_longstring]) then
- cp2:=current_settings.sourcecodepage;
- { don't change string if codepages are equal or string length is 0 }
+ cp2:=current_settings.sourcecodepage
+ else
+ internalerror(2013112916);
+ { don't change string if codepages are equal or string length is 0 }
if (cp1<>cp2) and (len>0) then
begin
if cpavailable(cp1) and cpavailable(cp2) then