Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e5a7724

Browse files
committed
Cherry-pick PR libgit2#3332: Resolve documentation warnings
1 parent a91dff8 commit e5a7724

File tree

8 files changed

+13
-10
lines changed

8 files changed

+13
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ ELSE ()
412412
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
413413
ENDIF ()
414414

415+
ADD_C_FLAG_IF_SUPPORTED(-Wdocumentation)
415416
ADD_C_FLAG_IF_SUPPORTED(-Wno-missing-field-initializers)
416417
ADD_C_FLAG_IF_SUPPORTED(-Wstrict-aliasing=2)
417418
ADD_C_FLAG_IF_SUPPORTED(-Wstrict-prototypes)

include/git2/repository.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, cons
745745
*
746746
* @param repo the repository to configure
747747
* @param name the name to use for the reflog entries
748-
* @param name the email to use for the reflog entries
748+
* @param email the email to use for the reflog entries
749749
*/
750750
GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name, const char *email);
751751

include/git2/sys/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct git_config_backend {
7676
* Initializes a `git_config_backend` with default values. Equivalent to
7777
* creating an instance with GIT_CONFIG_BACKEND_INIT.
7878
*
79-
* @param opts the `git_config_backend` struct to initialize.
79+
* @param backend the `git_config_backend` struct to initialize.
8080
* @param version Version of struct; pass `GIT_CONFIG_BACKEND_VERSION`
8181
* @return Zero on success; -1 on failure.
8282
*/

include/git2/sys/diff.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GIT_EXTERN(int) git_diff_print_callback__to_buf(
3838
const git_diff_delta *delta,
3939
const git_diff_hunk *hunk,
4040
const git_diff_line *line,
41-
void *payload); /*< payload must be a `git_buf *` */
41+
void *payload); /**< payload must be a `git_buf *` */
4242

4343
/**
4444
* Diff print callback that writes to stdio FILE handle.
@@ -58,16 +58,16 @@ GIT_EXTERN(int) git_diff_print_callback__to_file_handle(
5858
const git_diff_delta *delta,
5959
const git_diff_hunk *hunk,
6060
const git_diff_line *line,
61-
void *payload); /*< payload must be a `FILE *` */
61+
void *payload); /**< payload must be a `FILE *` */
6262

6363

6464
/**
6565
* Performance data from diffing
6666
*/
6767
typedef struct {
6868
unsigned int version;
69-
size_t stat_calls; /*< Number of stat() calls performed */
70-
size_t oid_calculations; /*< Number of ID calculations */
69+
size_t stat_calls; /**< Number of stat() calls performed */
70+
size_t oid_calculations; /**< Number of ID calculations */
7171
} git_diff_perfdata;
7272

7373
#define GIT_DIFF_PERFDATA_VERSION 1

include/git2/sys/odb_backend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct git_odb_backend {
9393
* Initializes a `git_odb_backend` with default values. Equivalent to
9494
* creating an instance with GIT_ODB_BACKEND_INIT.
9595
*
96-
* @param opts the `git_odb_backend` struct to initialize.
96+
* @param backend the `git_odb_backend` struct to initialize.
9797
* @param version Version the struct; pass `GIT_ODB_BACKEND_VERSION`
9898
* @return Zero on success; -1 on failure.
9999
*/

include/git2/sys/refdb_backend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct git_refdb_backend {
175175
* Initializes a `git_refdb_backend` with default values. Equivalent to
176176
* creating an instance with GIT_REFDB_BACKEND_INIT.
177177
*
178-
* @param opts the `git_refdb_backend` struct to initialize
178+
* @param backend the `git_refdb_backend` struct to initialize
179179
* @param version Version of struct; pass `GIT_REFDB_BACKEND_VERSION`
180180
* @return Zero on success; -1 on failure.
181181
*/

src/path.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ extern int git_path_cmp(
319319
* @param callback Function to invoke on each path. Passed the `payload`
320320
* and the buffer containing the current path. The path should not
321321
* be modified in any way. Return non-zero to stop iteration.
322-
* @param state Passed to fn as the first ath.
322+
* @param payload Passed to fn as the first ath.
323323
*/
324324
extern int git_path_walk_up(
325325
git_buf *pathbuf,

src/push.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int git_push_add_refspec(git_push *push, const char *refspec);
8383
* Update remote tips after a push
8484
*
8585
* @param push The push object
86-
* @param signature The identity to use when updating reflogs
86+
* @param callbacks the callbacks to use for this connection
8787
*
8888
* @return 0 or an error code
8989
*/
@@ -100,6 +100,7 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks);
100100
* order to find out which updates were accepted or rejected.
101101
*
102102
* @param push The push object
103+
* @param callbacks the callbacks to use for this connection
103104
*
104105
* @return 0 or an error code
105106
*/
@@ -117,6 +118,7 @@ int git_push_finish(git_push *push, const git_remote_callbacks *callbacks);
117118
*
118119
* @param push The push object
119120
* @param cb The callback to call on each object
121+
* @param data The payload passed to the callback
120122
*
121123
* @return 0 on success, non-zero callback return value, or error code
122124
*/

0 commit comments

Comments
 (0)