Skip to content

Commit

Permalink
fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengxwen committed Jan 19, 2024
1 parent d28167b commit 5eb33a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: HIBAG
Type: Package
Title: HLA Genotype Imputation with Attribute Bagging
Version: 1.38.1
Date: 2023-12-12
Version: 1.38.2
Date: 2024-01-19
Depends: R (>= 3.2.0)
Imports: methods, RcppParallel
Suggests: parallel, ggplot2, reshape2, gdsfmt, SNPRelate, SeqArray, knitr,
Expand Down
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
CHANGES IN VERSION 1.38.2
-------------------------

o fix compiler warnings: -Wformat & -Wformat-security


CHANGES IN VERSION 1.38.1
-------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/HIBAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extern "C"
catch (...) { \
_LastError = "unknown error!"; has_error = true; \
} \
if (has_error) error(_LastError.c_str()); \
if (has_error) Rf_error("%s", _LastError.c_str()); \
return rv_ans;


Expand Down Expand Up @@ -459,7 +459,7 @@ static void model_free(SEXP ptr_obj)
} catch (...) {
_LastError = "unknown error!"; has_error = true;
}
if (has_error) error(_LastError.c_str());
if (has_error) Rf_error("%s", _LastError.c_str());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/LibHLA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2074,10 +2074,10 @@ void CVariableSelection::Search(CBaseSampling &VarSampling,
if (verbose_detail)
{
Rprintf(" %2d, SNP: %d, loss: %g, oob acc: %0.2f%%, # of haplo: %d\n",
OutSNPIndex.size(), OutSNPIndex.back()+1,
(int)OutSNPIndex.size(), OutSNPIndex.back()+1,
Global_Min_Loss,
double(Global_Max_OutOfBagAcc) / NumOOB * 50,
OutHaplo.Num_Haplo);
(int)OutHaplo.Num_Haplo);
}
CheckInterrupt();
} else {
Expand Down

0 comments on commit 5eb33a6

Please sign in to comment.