Skip to content

Commit 2f23559

Browse files
committed
msvc bch.c fixups
1 parent c8c28c5 commit 2f23559

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bch.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
#define BCH_ECC_MAX_WORDS DIV_ROUND_UP(BCH_MAX_M * BCH_MAX_T, 32)
138138

139139
#ifndef dbg
140-
#define dbg(_fmt, args...) do {} while (0)
140+
#define dbg(_fmt, ...) do {} while (0)
141141
#endif
142142

143143
/*
@@ -153,7 +153,9 @@ struct gf_poly {
153153

154154
/* polynomial of degree 1 */
155155
struct gf_poly_deg1 {
156-
struct gf_poly poly;
156+
struct {
157+
unsigned int deg;
158+
} poly;
157159
unsigned int c[2];
158160
};
159161

@@ -991,7 +993,7 @@ static void factor_polynomial(struct bch_control *bch, int k, struct gf_poly *f,
991993
/* compute h=f/gcd(f,tk); this will modify f and q */
992994
gf_poly_div(bch, f, gcd, q);
993995
/* store g and h in-place (clobbering f) */
994-
*h = &((struct gf_poly_deg1 *)f)[gcd->deg].poly;
996+
*h = (struct gf_poly *) &((struct gf_poly_deg1 *)f)[gcd->deg].poly;
995997
gf_poly_copy(*g, gcd);
996998
gf_poly_copy(*h, q);
997999
}

0 commit comments

Comments
 (0)