as: tunit: fix dialyzer error

This commit is contained in:
Mikael Pettersson
2020-03-02 21:47:46 +01:00
parent 629ee7993d
commit 38ca3f4d40
2 changed files with 7 additions and 7 deletions

View File

@@ -642,8 +642,8 @@ expr_fixup(Tunit, Expr) ->
tunit_init() -> tunit_init() ->
SectionText = section_dot_text(), SectionText = section_dot_text(),
Tunit = tunit:put_section(tunit:new(), SectionText), Cursect = SectionText#section.name,
Tunit#tunit{cursect = SectionText#section.name}. tunit:put_section(tunit:new(Cursect), SectionText).
%% Predefined Sections --------------------------------------------------------- %% Predefined Sections ---------------------------------------------------------

View File

@@ -1,7 +1,7 @@
%%% -*- erlang-indent-level: 2 -*- %%% -*- erlang-indent-level: 2 -*-
%%% %%%
%%% translation unit handling for pdp10-elf as. %%% translation unit handling for pdp10-elf as.
%%% Copyright (C) 2013-2019 Mikael Pettersson %%% Copyright (C) 2013-2020 Mikael Pettersson
%%% %%%
%%% This file is part of pdp10-tools. %%% This file is part of pdp10-tools.
%%% %%%
@@ -20,7 +20,7 @@
-module(tunit). -module(tunit).
-export([ new/0 -export([ new/1
, get_section/2 , get_section/2
, put_section/2 , put_section/2
, get_symbol/2 , get_symbol/2
@@ -33,10 +33,10 @@
%% API ------------------------------------------------------------------------- %% API -------------------------------------------------------------------------
-spec new() -> #tunit{}. -spec new(string()) -> #tunit{}.
new() -> new(Cursect) ->
#tunit{ sections = #{} #tunit{ sections = #{}
, cursect = false , cursect = Cursect
, symbols = #{} , symbols = #{}
, local_labels = #{} , local_labels = #{}
}. }.