Skip to content

Commit ee1d451

Browse files
committed
Fixed warnings
1 parent 51be85a commit ee1d451

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/libasr/codegen/asr_to_llvm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10709,7 +10709,7 @@ Result<std::unique_ptr<LLVMModule>> asr_to_llvm(ASR::TranslationUnit_t &asr,
1070910709
diag::Diagnostics &diagnostics,
1071010710
llvm::LLVMContext &context, Allocator &al,
1071110711
LCompilers::PassManager& pass_manager,
10712-
CompilerOptions &co, const std::string &run_fn, const std::string &global_underscore,
10712+
CompilerOptions &co, const std::string &run_fn, const std::string &/*global_underscore*/,
1071310713
const std::string &infile)
1071410714
{
1071510715
#if LLVM_VERSION_MAJOR >= 15

src/lpython/python_kernel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace LCompilers::LPython {
5757

5858
~RedirectStdout() {
5959
fflush(stdout);
60-
read(out_pipe[0], buffer, MAX_LEN);
60+
(void)read(out_pipe[0], buffer, MAX_LEN);
6161
dup2(saved_stdout, stdout_fileno);
6262
_out = std::string(&buffer[1]);
6363
}
@@ -110,7 +110,7 @@ namespace LCompilers::LPython {
110110
void shutdown_request_impl() override;
111111
};
112112

113-
113+
114114
void custom_interpreter::execute_request_impl(send_reply_callback cb,
115115
int execution_counter, // Typically the cell number
116116
const std::string& code, // Code to execute
@@ -409,7 +409,7 @@ namespace LCompilers::LPython {
409409
cb(result);
410410
return;
411411
}
412-
412+
413413
void custom_interpreter::configure_impl()
414414
{
415415
// Perform some operations

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8844,11 +8844,11 @@ we will have to use something else.
88448844
if ( assign_asr_target == nullptr ) {
88458845
throw SemanticError("set from list cannot be called without target type for now", x.base.base.loc);
88468846
}
8847-
ASR::expr_t *arg = args[0].m_value;
8847+
ASR::expr_t *arg = args[0].m_value;
88488848
ASR::ttype_t *type = ASRUtils::expr_type(arg);
88498849
if(!ASR::is_a<ASR::ListConstant_t>(*arg)) {
88508850
throw SemanticError("set accepts only list constant for now, got " +
8851-
ASRUtils::type_to_str(type) + " type.", x.base.base.loc);
8851+
ASRUtils::type_to_str_python(type) + " type.", x.base.base.loc);
88528852
}
88538853
ASR::ListConstant_t* list = ASR::down_cast<ASR::ListConstant_t>(arg);
88548854
ASR::expr_t **m_args = list->m_args;
@@ -8859,8 +8859,8 @@ we will have to use something else.
88598859
std::string ltype = ASRUtils::type_to_str_python(target_type);
88608860
std::string rtype = ASRUtils::type_to_str_python(value_type);
88618861
throw SemanticError("type mismatch ('" + ltype + "' and '" + rtype + "')", x.base.base.loc);
8862-
}
8863-
tmp = ASR::make_SetConstant_t(al, x.base.base.loc, m_args, n_args,
8862+
}
8863+
tmp = ASR::make_SetConstant_t(al, x.base.base.loc, m_args, n_args,
88648864
ASRUtils::expr_type(assign_asr_target));
88658865
return ;
88668866
} else if( call_name == "deepcopy" ) {

0 commit comments

Comments
 (0)