Re: [PATCH 1/3] read-trees: refactor the unpack_trees() part
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 30, 2006, 21:36 UTC
- Message-ID
- <7v4pwydbbr.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0607302024090.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 26 quoted lines
> diff --git a/unpack-trees.h b/unpack-trees.h
> new file mode 100644
> index 0000000..babfcd7
> --- /dev/null
> +++ b/unpack-trees.h
> @@ -0,0 +1,30 @@
> +#ifndef UNPACK_TREES_H
> +#define UNPACK_TREES_H
>...
> +struct unpack_trees_options {
> + int reset;
> + int merge;
> + int update;
> + int index_only;
> + int nontrivial_merge;
> + int trivial_merges_only;
> + int verbose_update;
> + int aggressive;
> + const char *prefix;
> + merge_fn_t fn;
> +
> + int head_idx;
> + int merge_size;
> +
> + struct cache_entry df_conflict_entry;
> +};Hmmmm.....
gcc -o unpack-trees.o -c -O2 -Werror -ansi -pedantic -std=c99 -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wall -Wdeclaration-after-statement -g -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRLCPY unpack-trees.c cc1: warnings being treated as errors In file included from unpack-trees.c:7: unpack-trees.h:24: warning: invalid use of structure with flexible array member make: *** [unpack-trees.o] Error 1