diff options
author | Peter Pettersson <boretrk@hotmail.com> | 2021-10-22 22:51:59 +0200 |
---|---|---|
committer | Peter Pettersson <boretrk@hotmail.com> | 2021-11-15 16:45:40 +0100 |
commit | 7dcc29fc4652caeb09de39827cfd1a80726b5995 (patch) | |
tree | 74992ead7b05460f0d6a9fcc894f3dc9a3cbaea7 | |
parent | 43d9f0e3fe96823d88475fd9edae07732c84dbc8 (diff) | |
download | libgit2-7dcc29fc4652caeb09de39827cfd1a80726b5995.tar.gz |
Make enum in src,tests and examples C90 compliant by removing trailing comma.
-rw-r--r-- | examples/add.c | 2 | ||||
-rw-r--r-- | examples/remote.c | 2 | ||||
-rw-r--r-- | examples/status.c | 2 | ||||
-rw-r--r-- | src/annotated_commit.h | 2 | ||||
-rw-r--r-- | src/checkout.c | 2 | ||||
-rw-r--r-- | src/commit.h | 2 | ||||
-rw-r--r-- | src/commit_graph.c | 2 | ||||
-rw-r--r-- | src/crlf.c | 2 | ||||
-rw-r--r-- | src/diff.h | 2 | ||||
-rw-r--r-- | src/diff_driver.c | 2 | ||||
-rw-r--r-- | src/diff_generate.h | 4 | ||||
-rw-r--r-- | src/futils.h | 6 | ||||
-rw-r--r-- | src/ignore.h | 2 | ||||
-rw-r--r-- | src/index.c | 2 | ||||
-rw-r--r-- | src/iterator.c | 2 | ||||
-rw-r--r-- | src/iterator.h | 4 | ||||
-rw-r--r-- | src/merge.h | 6 | ||||
-rw-r--r-- | src/netops.h | 2 | ||||
-rw-r--r-- | src/odb.h | 2 | ||||
-rw-r--r-- | src/patch_generate.h | 2 | ||||
-rw-r--r-- | src/patch_parse.c | 2 | ||||
-rw-r--r-- | src/pathspec.h | 2 | ||||
-rw-r--r-- | src/pqueue.h | 2 | ||||
-rw-r--r-- | src/rebase.c | 2 | ||||
-rw-r--r-- | src/refdb_fs.c | 2 | ||||
-rw-r--r-- | src/repository.h | 4 | ||||
-rw-r--r-- | src/submodule.c | 2 | ||||
-rw-r--r-- | src/submodule.h | 2 | ||||
-rw-r--r-- | src/sysdir.h | 2 | ||||
-rw-r--r-- | src/trailer.c | 2 | ||||
-rw-r--r-- | src/transaction.c | 2 | ||||
-rw-r--r-- | src/transports/auth.h | 2 | ||||
-rw-r--r-- | src/transports/smart.h | 2 | ||||
-rw-r--r-- | src/transports/winhttp.c | 2 | ||||
-rw-r--r-- | src/vector.h | 2 | ||||
-rw-r--r-- | src/zstream.h | 2 | ||||
-rw-r--r-- | tests/clar.h | 6 |
37 files changed, 46 insertions, 46 deletions
diff --git a/examples/add.c b/examples/add.c index 4ff7c79e2..1c93b1140 100644 --- a/examples/add.c +++ b/examples/add.c @@ -28,7 +28,7 @@ enum index_mode { INDEX_NONE, - INDEX_ADD, + INDEX_ADD }; struct index_options { diff --git a/examples/remote.c b/examples/remote.c index 57f758c6c..14fac030c 100644 --- a/examples/remote.c +++ b/examples/remote.c @@ -27,7 +27,7 @@ enum subcmd { subcmd_remove, subcmd_rename, subcmd_seturl, - subcmd_show, + subcmd_show }; struct remote_opts { diff --git a/examples/status.c b/examples/status.c index 8cf922127..e659efb05 100644 --- a/examples/status.c +++ b/examples/status.c @@ -38,7 +38,7 @@ enum { FORMAT_DEFAULT = 0, FORMAT_LONG = 1, FORMAT_SHORT = 2, - FORMAT_PORCELAIN = 3, + FORMAT_PORCELAIN = 3 }; #define MAX_PATHSPEC 8 diff --git a/src/annotated_commit.h b/src/annotated_commit.h index b390066b2..444a2ed10 100644 --- a/src/annotated_commit.h +++ b/src/annotated_commit.h @@ -15,7 +15,7 @@ typedef enum { GIT_ANNOTATED_COMMIT_REAL = 1, - GIT_ANNOTATED_COMMIT_VIRTUAL = 2, + GIT_ANNOTATED_COMMIT_VIRTUAL = 2 } git_annotated_commit_t; /** diff --git a/src/checkout.c b/src/checkout.c index 5733f4ab5..11be2e84f 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -45,7 +45,7 @@ enum { CHECKOUT_ACTION__UPDATE_CONFLICT = 32, CHECKOUT_ACTION__MAX = 32, CHECKOUT_ACTION__REMOVE_AND_UPDATE = - (CHECKOUT_ACTION__UPDATE_BLOB | CHECKOUT_ACTION__REMOVE), + (CHECKOUT_ACTION__UPDATE_BLOB | CHECKOUT_ACTION__REMOVE) }; typedef struct { diff --git a/src/commit.h b/src/commit.h index 9378eab2d..7a2454e61 100644 --- a/src/commit.h +++ b/src/commit.h @@ -61,7 +61,7 @@ int git_commit__parse(void *commit, git_odb_object *obj); int git_commit__parse_raw(void *commit, const char *data, size_t size); typedef enum { - GIT_COMMIT_PARSE_QUICK = (1 << 0), /**< Only parse parents and committer info */ + GIT_COMMIT_PARSE_QUICK = (1 << 0) /**< Only parse parents and committer info */ } git_commit__parse_flags; int git_commit__parse_ext(git_commit *commit, git_odb_object *odb_obj, unsigned int flags); diff --git a/src/commit_graph.c b/src/commit_graph.c index f9a4bd2b2..924a3992b 100644 --- a/src/commit_graph.c +++ b/src/commit_graph.c @@ -754,7 +754,7 @@ enum generation_number_commit_state { GENERATION_NUMBER_COMMIT_STATE_UNVISITED = 0, GENERATION_NUMBER_COMMIT_STATE_ADDED = 1, GENERATION_NUMBER_COMMIT_STATE_EXPANDED = 2, - GENERATION_NUMBER_COMMIT_STATE_VISITED = 3, + GENERATION_NUMBER_COMMIT_STATE_VISITED = 3 }; static int compute_generation_numbers(git_vector *commits) diff --git a/src/crlf.c b/src/crlf.c index 7895ddec2..1e1f1e845 100644 --- a/src/crlf.c +++ b/src/crlf.c @@ -26,7 +26,7 @@ typedef enum { GIT_CRLF_TEXT_CRLF, GIT_CRLF_AUTO, GIT_CRLF_AUTO_INPUT, - GIT_CRLF_AUTO_CRLF, + GIT_CRLF_AUTO_CRLF } git_crlf_t; struct crlf_attrs { diff --git a/src/diff.h b/src/diff.h index 4b0339809..2cc35e65b 100644 --- a/src/diff.h +++ b/src/diff.h @@ -26,7 +26,7 @@ typedef enum { GIT_DIFF_TYPE_UNKNOWN = 0, GIT_DIFF_TYPE_GENERATED = 1, - GIT_DIFF_TYPE_PARSED = 2, + GIT_DIFF_TYPE_PARSED = 2 } git_diff_origin_t; struct git_diff { diff --git a/src/diff_driver.c b/src/diff_driver.c index f6b51d8ba..a20723fcc 100644 --- a/src/diff_driver.c +++ b/src/diff_driver.c @@ -21,7 +21,7 @@ typedef enum { DIFF_DRIVER_AUTO = 0, DIFF_DRIVER_BINARY = 1, DIFF_DRIVER_TEXT = 2, - DIFF_DRIVER_PATTERNLIST = 3, + DIFF_DRIVER_PATTERNLIST = 3 } git_diff_driver_t; typedef struct { diff --git a/src/diff_generate.h b/src/diff_generate.h index 5186d552c..f39bf6b2a 100644 --- a/src/diff_generate.h +++ b/src/diff_generate.h @@ -18,7 +18,7 @@ enum { GIT_DIFFCAPS_IGNORE_STAT = (1 << 1), /* use stat? */ GIT_DIFFCAPS_TRUST_MODE_BITS = (1 << 2), /* use st_mode? */ GIT_DIFFCAPS_TRUST_CTIME = (1 << 3), /* use st_ctime? */ - GIT_DIFFCAPS_USE_DEV = (1 << 4), /* use st_dev? */ + GIT_DIFFCAPS_USE_DEV = (1 << 4) /* use st_dev? */ }; #define DIFF_FLAGS_KNOWN_BINARY (GIT_DIFF_FLAG_BINARY|GIT_DIFF_FLAG_NOT_BINARY) @@ -36,7 +36,7 @@ enum { GIT_DIFF_FLAG__TO_SPLIT = (1 << 17), /* split entry during rename det. */ GIT_DIFF_FLAG__IS_RENAME_TARGET = (1 << 18), GIT_DIFF_FLAG__IS_RENAME_SOURCE = (1 << 19), - GIT_DIFF_FLAG__HAS_SELF_SIMILARITY = (1 << 20), + GIT_DIFF_FLAG__HAS_SELF_SIMILARITY = (1 << 20) }; #define GIT_DIFF_FLAG__CLEAR_INTERNAL(F) (F) = ((F) & 0x00FFFF) diff --git a/src/futils.h b/src/futils.h index 22098addf..1386dc482 100644 --- a/src/futils.h +++ b/src/futils.h @@ -96,7 +96,7 @@ typedef enum { GIT_MKDIR_SKIP_LAST2 = 32, GIT_MKDIR_VERIFY_DIR = 64, GIT_MKDIR_REMOVE_FILES = 128, - GIT_MKDIR_REMOVE_SYMLINKS = 256, + GIT_MKDIR_REMOVE_SYMLINKS = 256 } git_futils_mkdir_flags; struct git_futils_mkdir_perfdata @@ -159,7 +159,7 @@ typedef enum { GIT_RMDIR_SKIP_NONEMPTY = (1 << 1), GIT_RMDIR_EMPTY_PARENTS = (1 << 2), GIT_RMDIR_REMOVE_BLOCKERS = (1 << 3), - GIT_RMDIR_SKIP_ROOT = (1 << 4), + GIT_RMDIR_SKIP_ROOT = (1 << 4) } git_futils_rmdir_flags; /** @@ -224,7 +224,7 @@ typedef enum { GIT_CPDIR_OVERWRITE = (1u << 3), GIT_CPDIR_CHMOD_DIRS = (1u << 4), GIT_CPDIR_SIMPLE_TO_MODE = (1u << 5), - GIT_CPDIR_LINK_FILES = (1u << 6), + GIT_CPDIR_LINK_FILES = (1u << 6) } git_futils_cpdir_flags; /** diff --git a/src/ignore.h b/src/ignore.h index 799195258..aa5ca62b7 100644 --- a/src/ignore.h +++ b/src/ignore.h @@ -48,7 +48,7 @@ enum { GIT_IGNORE_UNCHECKED = -2, GIT_IGNORE_NOTFOUND = -1, GIT_IGNORE_FALSE = 0, - GIT_IGNORE_TRUE = 1, + GIT_IGNORE_TRUE = 1 }; extern int git_ignore__lookup(int *out, git_ignores *ign, const char *path, git_dir_flag dir_flag); diff --git a/src/index.c b/src/index.c index bd6ea8f03..7ade4341f 100644 --- a/src/index.c +++ b/src/index.c @@ -3386,7 +3386,7 @@ enum { INDEX_ACTION_NONE = 0, INDEX_ACTION_UPDATE = 1, INDEX_ACTION_REMOVE = 2, - INDEX_ACTION_ADDALL = 3, + INDEX_ACTION_ADDALL = 3 }; int git_index_add_all( diff --git a/src/iterator.c b/src/iterator.c index a4337bb9a..15bb63dc8 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -293,7 +293,7 @@ typedef enum { ITERATOR_PATHLIST_IS_FILE = 1, ITERATOR_PATHLIST_IS_DIR = 2, ITERATOR_PATHLIST_IS_PARENT = 3, - ITERATOR_PATHLIST_FULL = 4, + ITERATOR_PATHLIST_FULL = 4 } iterator_pathlist_search_t; static iterator_pathlist_search_t iterator_pathlist_search( diff --git a/src/iterator.h b/src/iterator.h index e55c1047a..6bb8489d0 100644 --- a/src/iterator.h +++ b/src/iterator.h @@ -21,7 +21,7 @@ typedef enum { GIT_ITERATOR_TREE = 1, GIT_ITERATOR_INDEX = 2, GIT_ITERATOR_WORKDIR = 3, - GIT_ITERATOR_FS = 4, + GIT_ITERATOR_FS = 4 } git_iterator_t; typedef enum { @@ -42,7 +42,7 @@ typedef enum { /** descend into symlinked directories */ GIT_ITERATOR_DESCEND_SYMLINKS = (1u << 7), /** hash files in workdir or filesystem iterators */ - GIT_ITERATOR_INCLUDE_HASH = (1u << 8), + GIT_ITERATOR_INCLUDE_HASH = (1u << 8) } git_iterator_flag_t; typedef enum { diff --git a/src/merge.h b/src/merge.h index 3e7f80c6e..632f2d8e3 100644 --- a/src/merge.h +++ b/src/merge.h @@ -29,12 +29,12 @@ /** Internal merge flags. */ enum { /** The merge is for a virtual base in a recursive merge. */ - GIT_MERGE__VIRTUAL_BASE = (1 << 31), + GIT_MERGE__VIRTUAL_BASE = (1 << 31) }; enum { /** Accept the conflict file, staging it as the merge result. */ - GIT_MERGE_FILE_FAVOR__CONFLICTED = 4, + GIT_MERGE_FILE_FAVOR__CONFLICTED = 4 }; @@ -83,7 +83,7 @@ typedef enum { GIT_MERGE_DIFF_DIRECTORY_FILE = (1 << 10), /* The child of a folder that is in a directory/file conflict. */ - GIT_MERGE_DIFF_DF_CHILD = (1 << 11), + GIT_MERGE_DIFF_DF_CHILD = (1 << 11) } git_merge_diff_t; typedef struct { diff --git a/src/netops.h b/src/netops.h index 7140b39bc..56f968534 100644 --- a/src/netops.h +++ b/src/netops.h @@ -42,7 +42,7 @@ typedef struct gitno_buffer { /* Flags to gitno_connect */ enum { /* Attempt to create an SSL connection. */ - GITNO_CONNECT_SSL = 1, + GITNO_CONNECT_SSL = 1 }; /** @@ -53,7 +53,7 @@ struct git_odb { }; typedef enum { - GIT_ODB_CAP_FROM_OWNER = -1, + GIT_ODB_CAP_FROM_OWNER = -1 } git_odb_cap_t; /* diff --git a/src/patch_generate.h b/src/patch_generate.h index 20f78cbfa..0e09d27ca 100644 --- a/src/patch_generate.h +++ b/src/patch_generate.h @@ -21,7 +21,7 @@ enum { GIT_PATCH_GENERATED_DIFFABLE = (1 << 3), /* the difference between the two sides has been computed */ GIT_PATCH_GENERATED_DIFFED = (1 << 4), - GIT_PATCH_GENERATED_FLATTENED = (1 << 5), + GIT_PATCH_GENERATED_FLATTENED = (1 << 5) }; struct git_patch_generated { diff --git a/src/patch_parse.c b/src/patch_parse.c index 891cf79a3..37822fccc 100644 --- a/src/patch_parse.c +++ b/src/patch_parse.c @@ -382,7 +382,7 @@ typedef enum { STATE_RENAME, STATE_COPY, - STATE_END, + STATE_END } parse_header_state; typedef struct { diff --git a/src/pathspec.h b/src/pathspec.h index bfdcd48a7..0256cb927 100644 --- a/src/pathspec.h +++ b/src/pathspec.h @@ -25,7 +25,7 @@ struct git_pathspec { enum { PATHSPEC_DATATYPE_STRINGS = 0, - PATHSPEC_DATATYPE_DIFF = 1, + PATHSPEC_DATATYPE_DIFF = 1 }; typedef git_array_t(char *) git_pathspec_string_array_t; diff --git a/src/pqueue.h b/src/pqueue.h index c0a6cd49e..4db74ea03 100644 --- a/src/pqueue.h +++ b/src/pqueue.h @@ -15,7 +15,7 @@ typedef git_vector git_pqueue; enum { /* flag meaning: don't grow heap, keep highest values only */ - GIT_PQUEUE_FIXED_SIZE = (GIT_VECTOR_FLAG_MAX << 1), + GIT_PQUEUE_FIXED_SIZE = (GIT_VECTOR_FLAG_MAX << 1) }; /** diff --git a/src/rebase.c b/src/rebase.c index 26b03b38c..4ad37643b 100644 --- a/src/rebase.c +++ b/src/rebase.c @@ -53,7 +53,7 @@ typedef enum { GIT_REBASE_NONE = 0, GIT_REBASE_APPLY = 1, GIT_REBASE_MERGE = 2, - GIT_REBASE_INTERACTIVE = 3, + GIT_REBASE_INTERACTIVE = 3 } git_rebase_t; struct git_rebase { diff --git a/src/refdb_fs.c b/src/refdb_fs.c index 097d2b38e..055ca2559 100644 --- a/src/refdb_fs.c +++ b/src/refdb_fs.c @@ -35,7 +35,7 @@ enum { PACKREF_HAS_PEEL = 1, PACKREF_WAS_LOOSE = 2, PACKREF_CANNOT_PEEL = 4, - PACKREF_SHADOWED = 8, + PACKREF_SHADOWED = 8 }; enum { diff --git a/src/repository.h b/src/repository.h index 1ea5a44f7..3c3aa1e8e 100644 --- a/src/repository.h +++ b/src/repository.h @@ -118,14 +118,14 @@ typedef enum { /* core.fsyncObjectFiles */ GIT_FSYNCOBJECTFILES_DEFAULT = GIT_CONFIGMAP_FALSE, /* core.longpaths */ - GIT_LONGPATHS_DEFAULT = GIT_CONFIGMAP_FALSE, + GIT_LONGPATHS_DEFAULT = GIT_CONFIGMAP_FALSE } git_configmap_value; /* internal repository init flags */ enum { GIT_REPOSITORY_INIT__HAS_DOTGIT = (1u << 16), GIT_REPOSITORY_INIT__NATURAL_WD = (1u << 17), - GIT_REPOSITORY_INIT__IS_REINIT = (1u << 18), + GIT_REPOSITORY_INIT__IS_REINIT = (1u << 18) }; /** Internal structure for repository object */ diff --git a/src/submodule.c b/src/submodule.c index 0370ac82b..0f4f0726c 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -61,7 +61,7 @@ enum { }; enum { GITMODULES_EXISTING = 0, - GITMODULES_CREATE = 1, + GITMODULES_CREATE = 1 }; static int submodule_alloc(git_submodule **out, git_repository *repo, const char *name); diff --git a/src/submodule.h b/src/submodule.h index b01ff68a2..7fa982486 100644 --- a/src/submodule.h +++ b/src/submodule.h @@ -110,7 +110,7 @@ enum { GIT_SUBMODULE_STATUS__HEAD_NOT_SUBMODULE = (1u << 24), GIT_SUBMODULE_STATUS__INDEX_NOT_SUBMODULE = (1u << 25), GIT_SUBMODULE_STATUS__WD_NOT_SUBMODULE = (1u << 26), - GIT_SUBMODULE_STATUS__INDEX_MULTIPLE_ENTRIES = (1u << 27), + GIT_SUBMODULE_STATUS__INDEX_MULTIPLE_ENTRIES = (1u << 27) }; #define GIT_SUBMODULE_STATUS__CLEAR_INTERNAL(S) \ diff --git a/src/sysdir.h b/src/sysdir.h index d12bac9d9..43392a022 100644 --- a/src/sysdir.h +++ b/src/sysdir.h @@ -74,7 +74,7 @@ typedef enum { GIT_SYSDIR_XDG = 2, GIT_SYSDIR_PROGRAMDATA = 3, GIT_SYSDIR_TEMPLATE = 4, - GIT_SYSDIR__MAX = 5, + GIT_SYSDIR__MAX = 5 } git_sysdir_t; /** diff --git a/src/trailer.c b/src/trailer.c index 61cdd1ba1..4761c9922 100644 --- a/src/trailer.c +++ b/src/trailer.c @@ -286,7 +286,7 @@ enum trailer_state { S_VALUE = 4, S_VALUE_NL = 5, S_VALUE_END = 6, - S_IGNORE = 7, + S_IGNORE = 7 }; #define NEXT(st) { state = (st); ptr++; continue; } diff --git a/src/transaction.c b/src/transaction.c index 98fa1ba90..ccffa9984 100644 --- a/src/transaction.c +++ b/src/transaction.c @@ -23,7 +23,7 @@ typedef enum { TRANSACTION_NONE, TRANSACTION_REFS, - TRANSACTION_CONFIG, + TRANSACTION_CONFIG } transaction_t; typedef struct { diff --git a/src/transports/auth.h b/src/transports/auth.h index 824d7198c..64680cc53 100644 --- a/src/transports/auth.h +++ b/src/transports/auth.h @@ -15,7 +15,7 @@ typedef enum { GIT_HTTP_AUTH_BASIC = 1, GIT_HTTP_AUTH_NEGOTIATE = 2, - GIT_HTTP_AUTH_NTLM = 4, + GIT_HTTP_AUTH_NTLM = 4 } git_http_auth_t; typedef struct git_http_auth_context git_http_auth_context; diff --git a/src/transports/smart.h b/src/transports/smart.h index 225e64996..a9cab31ac 100644 --- a/src/transports/smart.h +++ b/src/transports/smart.h @@ -46,7 +46,7 @@ typedef enum { GIT_PKT_PROGRESS, GIT_PKT_OK, GIT_PKT_NG, - GIT_PKT_UNPACK, + GIT_PKT_UNPACK } git_pkt_type; /* Used for multi_ack and multi_ack_detailed */ diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c index efbaf0298..60f536fdb 100644 --- a/src/transports/winhttp.c +++ b/src/transports/winhttp.c @@ -99,7 +99,7 @@ typedef enum { GIT_WINHTTP_AUTH_BASIC = 1, GIT_WINHTTP_AUTH_NTLM = 2, GIT_WINHTTP_AUTH_NEGOTIATE = 4, - GIT_WINHTTP_AUTH_DIGEST = 8, + GIT_WINHTTP_AUTH_DIGEST = 8 } winhttp_authmechanism_t; typedef struct { diff --git a/src/vector.h b/src/vector.h index 3dcec3d13..ae3c79a4c 100644 --- a/src/vector.h +++ b/src/vector.h @@ -13,7 +13,7 @@ typedef int (*git_vector_cmp)(const void *, const void *); enum { GIT_VECTOR_SORTED = (1u << 0), - GIT_VECTOR_FLAG_MAX = (1u << 1), + GIT_VECTOR_FLAG_MAX = (1u << 1) }; typedef struct git_vector { diff --git a/src/zstream.h b/src/zstream.h index 3a59d9a36..3f8b1c72f 100644 --- a/src/zstream.h +++ b/src/zstream.h @@ -15,7 +15,7 @@ typedef enum { GIT_ZSTREAM_INFLATE, - GIT_ZSTREAM_DEFLATE, + GIT_ZSTREAM_DEFLATE } git_zstream_t; typedef struct { diff --git a/tests/clar.h b/tests/clar.h index 8c22382bd..3f659c2f6 100644 --- a/tests/clar.h +++ b/tests/clar.h @@ -13,12 +13,12 @@ enum cl_test_status { CL_TEST_OK, CL_TEST_FAILURE, CL_TEST_SKIP, - CL_TEST_NOTRUN, + CL_TEST_NOTRUN }; enum cl_output_format { CL_OUTPUT_CLAP, - CL_OUTPUT_TAP, + CL_OUTPUT_TAP }; /** Setup clar environment */ @@ -60,7 +60,7 @@ typedef enum cl_trace_event { CL_TRACE__TEST__END, CL_TRACE__TEST__RUN_BEGIN, CL_TRACE__TEST__RUN_END, - CL_TRACE__TEST__LONGJMP, + CL_TRACE__TEST__LONGJMP } cl_trace_event; typedef void (cl_trace_cb)( |