Browse Source

* initialize variables to avoid warnings

git-svn-id: trunk@32428 -
florian 9 years ago
parent
commit
1142fdeccd
4 changed files with 7 additions and 0 deletions
  1. 1 0
      compiler/aasmcnst.pas
  2. 1 0
      compiler/pdecl.pas
  3. 2 0
      compiler/pdecvar.pas
  4. 3 0
      compiler/pexpr.pas

+ 1 - 0
compiler/aasmcnst.pas

@@ -949,6 +949,7 @@ implementation
        customsecname: boolean;
      begin
        fvectorized_finalize_called:=true;
+       sym:=nil;
        customsecname:=get_vectorized_dead_strip_custom_section_name(basename,st,secname);
        if customsecname then
          sectype:=sec_user

+ 1 - 0
compiler/pdecl.pas

@@ -471,6 +471,7 @@ implementation
          block_type:=bt_type;
          hdef:=nil;
          first:=true;
+         had_generic:=false;
          repeat
            defpos:=current_tokenpos;
            istyperenaming:=false;

+ 2 - 0
compiler/pdecvar.pas

@@ -1287,6 +1287,8 @@ implementation
          sc:=TFPObjectList.create(false);
          first:=true;
          had_generic:=false;
+         vs:=nil;
+         fillchar(tmp_filepos,sizeof(tmp_filepos),0);
          while (token=_ID) do
            begin
              semicoloneaten:=false;

+ 3 - 0
compiler/pexpr.pas

@@ -2721,6 +2721,9 @@ implementation
            p1:=nil;
            spezcontext:=nil;
 
+           { avoid warning }
+           fillchar(dummypos,sizeof(dummypos),0);
+
            allowspecialize:=not (m_delphi in current_settings.modeswitches) and
                             not (ef_had_specialize in flags) and
                             (block_type in inline_specialization_block_types);