Skip to content

Commit

Permalink
Merge pull request #111 from guoard/fix/argument_j1
Browse files Browse the repository at this point in the history
Resolve warning by initializing j1 with initial argument
  • Loading branch information
hryamzik authored Nov 26, 2024
2 parents c585fcd + ddd1d80 commit 3337003
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func str_Format_MeasureUnit(MeasureUnit string, value string) string {
}

// Scale number for It measure unit
func str_Format_Byte(in string, j1 int) string {
func str_Format_Byte(in string, initial int) string {
var str_Size string

f, err := strconv.ParseFloat(in, 64)
Expand All @@ -170,7 +170,7 @@ func str_Format_Byte(in string, j1 int) string {
panic(err)
}

for j1 = 0; j1 < (Information_Size_MAX + 1); j1++ {
for j1 := initial; j1 < (Information_Size_MAX + 1); j1++ {

if j1 >= Information_Size_MAX {
str_Size = "Yb"
Expand Down Expand Up @@ -206,7 +206,7 @@ func str_Format_Byte(in string, j1 int) string {
}

// Format number for fisics measure unit
func str_Format_Scale(in string, j1 int) string {
func str_Format_Scale(in string, initial int) string {
var str_Size string

f, err := strconv.ParseFloat(in, 64)
Expand All @@ -215,7 +215,7 @@ func str_Format_Scale(in string, j1 int) string {
panic(err)
}

for j1 = 0; j1 < (Scale_Size_MAX + 1); j1++ {
for j1 := initial; j1 < (Scale_Size_MAX + 1); j1++ {

if j1 >= Scale_Size_MAX {
str_Size = "Y"
Expand Down

0 comments on commit 3337003

Please sign in to comment.