From f004096fff7c00f7ff17f8232f4d2d65ba4c546f Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Wed, 20 Dec 2023 11:20:45 +0000 Subject: [PATCH] examples: use unsigned int for bitfields --- examples/args.h | 2 +- examples/checkout.c | 6 +++--- examples/merge.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/args.h b/examples/args.h index d626f98c8..4db0493bb 100644 --- a/examples/args.h +++ b/examples/args.h @@ -8,7 +8,7 @@ struct args_info { int argc; char **argv; int pos; - int opts_done : 1; /**< Did we see a -- separator */ + unsigned int opts_done : 1; /**< Did we see a -- separator */ }; #define ARGS_INFO_INIT { argc, argv, 0, 0 } #define ARGS_CURRENT(args) args->argv[args->pos] diff --git a/examples/checkout.c b/examples/checkout.c index ac7b7422d..82567cdc4 100644 --- a/examples/checkout.c +++ b/examples/checkout.c @@ -35,9 +35,9 @@ */ typedef struct { - int force : 1; - int progress : 1; - int perf : 1; + unsigned int force : 1; + unsigned int progress : 1; + unsigned int perf : 1; } checkout_options; static void print_usage(void) diff --git a/examples/merge.c b/examples/merge.c index 460c06a25..7a76912cd 100644 --- a/examples/merge.c +++ b/examples/merge.c @@ -30,7 +30,7 @@ struct merge_options { git_annotated_commit **annotated; size_t annotated_count; - int no_commit : 1; + unsigned int no_commit : 1; }; static void print_usage(void)