Skip to content

Commit ee29785

Browse files
author
Andras Fekete
committed
Fix compiler warnings on bitfields
1 parent d39af6f commit ee29785

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/wp_rsa_asym.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ typedef struct wp_RsaAsymCtx {
7676
/** wolfSSL id of MGF operation to perform when padding mode is PSS. */
7777
int mgf;
7878
/** Indicates that the MGF id has been set explicitly. */
79-
int mgfSet:1;
79+
unsigned int mgfSet:1;
8080
/** Label to use with OAEP. */
8181
unsigned char* label;
8282
/** Length of label. */

src/wp_rsa_sig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ typedef struct wp_RsaSigCtx {
8989
/** wolfSSL id of MGF operation to perform when padding mode is PSS. */
9090
int mgf;
9191
/** Indicates that the MGF id has been set explicitly. */
92-
int mgfSet:1;
92+
unsigned int mgfSet:1;
9393

9494
/** Property query string. */
9595
char* propQuery;

test/unit.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ void print_buffer(const char *desc, const unsigned char *buffer, size_t len);
6464

6565
typedef int (*TEST_FUNC)(void *data);
6666
typedef struct TEST_CASE {
67-
const char *name;
68-
TEST_FUNC func;
69-
void *data;
70-
int err;
71-
int run:1;
72-
int done:1;
67+
const char *name;
68+
TEST_FUNC func;
69+
void *data;
70+
int err;
71+
unsigned int run:1;
72+
unsigned int done:1;
7373
#ifdef TEST_MULTITHREADED
74-
int attempted:1;
75-
pthread_t thread;
76-
int cnt;
74+
unsigned int attempted:1;
75+
pthread_t thread;
76+
int cnt;
7777
#endif
7878
} TEST_CASE;
7979

0 commit comments

Comments
 (0)