Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix compiler warnings about shadowed variables #47

Merged
merged 1 commit into from

2 participants

@taybin

No description provided.

@seancribbs

Thanks! Generally the case clauses should be indented underneath the 'case' statement, but this is ok and fixes the warning.

@seancribbs seancribbs merged commit 8a42ff0 into basho:master

1 check passed

Details default The Travis build passed
@taybin taybin deleted the taybin:fix_compiler_warnings branch
@taybin

I agree. I was trying to keep the existing formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 27, 2013
  1. @taybin
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 12 deletions.
  1. +12 −12 src/protobuffs_compile.erl
View
24 src/protobuffs_compile.erl
@@ -132,11 +132,11 @@ parse_imports([Head | Tail], Path, Acc) ->
output(Basename, MessagesRaw, RawEnums, Options) ->
Messages = canonize_names(MessagesRaw),
Enums = canonize_names(RawEnums),
- case proplists:get_value(output_include_dir,Options) of
+ HeaderFile = case proplists:get_value(output_include_dir,Options) of
undefined ->
- HeaderFile = Basename ++ ".hrl";
+ Basename ++ ".hrl";
HeaderPath ->
- HeaderFile = filename:join(HeaderPath,Basename) ++ ".hrl"
+ filename:join(HeaderPath,Basename) ++ ".hrl"
end,
error_logger:info_msg("Writing header file to ~p~n",[HeaderFile]),
@@ -145,11 +145,11 @@ output(Basename, MessagesRaw, RawEnums, Options) ->
{ok,{_,[{abstract_code,{_,Forms}}]}} = beam_lib:chunks(PokemonBeamFile, [abstract_code]),
Forms1 = filter_forms(Messages, Enums, Forms, Basename, []),
{ok, _, Bytes, _Warnings} = protobuffs_file:compile_forms(Forms1, proplists:get_value(compile_flags,Options,[])),
- case proplists:get_value(output_ebin_dir,Options) of
+ BeamFile = case proplists:get_value(output_ebin_dir,Options) of
undefined ->
- BeamFile = Basename ++ ".beam";
+ Basename ++ ".beam";
BeamPath ->
- BeamFile = filename:join(BeamPath,Basename) ++ ".beam"
+ filename:join(BeamPath,Basename) ++ ".beam"
end,
error_logger:info_msg("Writing beam file to ~p~n",[BeamFile]),
protobuffs_file:write_file(BeamFile, Bytes).
@@ -157,22 +157,22 @@ output(Basename, MessagesRaw, RawEnums, Options) ->
%% @hidden
output_source(Basename, MessagesRaw, Enums, Options) ->
Messages = canonize_names(MessagesRaw),
- case proplists:get_value(output_include_dir,Options) of
+ HeaderFile = case proplists:get_value(output_include_dir,Options) of
undefined ->
- HeaderFile = Basename ++ ".hrl";
+ Basename ++ ".hrl";
HeaderPath ->
- HeaderFile = filename:join(HeaderPath,Basename) ++ ".hrl"
+ filename:join(HeaderPath,Basename) ++ ".hrl"
end,
error_logger:info_msg("Writing header file to ~p~n",[HeaderFile]),
ok = write_header_include_file(HeaderFile, Messages),
PokemonBeamFile = filename:dirname(code:which(?MODULE)) ++ "/pokemon_pb.beam",
{ok,{_,[{abstract_code,{_,Forms}}]}} = beam_lib:chunks(PokemonBeamFile, [abstract_code]),
Forms1 = filter_forms(Messages, Enums, Forms, Basename, []),
- case proplists:get_value(output_src_dir,Options) of
+ SrcFile = case proplists:get_value(output_src_dir,Options) of
undefined ->
- SrcFile = Basename ++ ".erl";
+ Basename ++ ".erl";
SrcPath ->
- SrcFile = filename:join(SrcPath,Basename) ++ ".erl"
+ filename:join(SrcPath,Basename) ++ ".erl"
end,
error_logger:info_msg("Writing src file to ~p~n",[SrcFile]),
protobuffs_file:write_file(SrcFile, erl_prettypr:format(erl_syntax:form_list(Forms1))).
Something went wrong with that request. Please try again.