Skip to content

Commit

Permalink
fix: cast-function-type -> ..-strict
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Jan 29, 2025
1 parent 6880aa1 commit a9c8e37
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/libpmemobj/lane.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ lane_init(PMEMobjpool *pop, struct lane *lane, struct lane_layout *layout)
goto error_internal_new;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wcast-function-type-strict"
lane->external = operation_new((struct ulog *)&layout->external,
LANE_REDO_EXTERNAL_SIZE,
lane_redo_extend, (ulog_free_fn)pfree, &pop->p_ops,
Expand All @@ -227,7 +227,7 @@ lane_init(PMEMobjpool *pop, struct lane *lane, struct lane_layout *layout)
goto error_external_new;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wcast-function-type-strict"
lane->undo = operation_new((struct ulog *)&layout->undo,
LANE_UNDO_SIZE,
lane_undo_extend, (ulog_free_fn)pfree, &pop->p_ops,
Expand Down
2 changes: 1 addition & 1 deletion src/libpmemobj/obj_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int
pmemobj_log_set_function(pmemobj_log_function *log_function)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wcast-function-type-strict"
int ret = core_log_set_function((core_log_function *)log_function);
#pragma GCC diagnostic pop
return core_log_error_translate(ret);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ctl_prefault/ctl_prefault.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ main(int argc, char *argv[])
int open = atoi(argv[3]);

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wcast-function-type-strict"
prefault_fun(prefault, (fun)pmemobj_ctl_get, (fun)pmemobj_ctl_set);
#pragma GCC diagnostic pop
test_obj(path, open);
Expand Down
6 changes: 3 additions & 3 deletions src/test/obj_memops/obj_memops.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static void
test_redo(PMEMobjpool *pop, struct test_object *object)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wcast-function-type-strict"
struct operation_context *ctx = operation_new(
(struct ulog *)&object->redo, TEST_ENTRIES,
pmalloc_redo_extend, (ulog_free_fn)pfree,
Expand Down Expand Up @@ -625,7 +625,7 @@ test_redo_cleanup_same_size(PMEMobjpool *pop, struct test_object *object)
{
#define ULOG_SIZE 1024
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wcast-function-type-strict"
struct operation_context *ctx = operation_new(
(struct ulog *)&object->redo, TEST_ENTRIES,
pmalloc_redo_extend, (ulog_free_fn)pfree,
Expand Down Expand Up @@ -656,7 +656,7 @@ static void
test_undo(PMEMobjpool *pop, struct test_object *object)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wcast-function-type-strict"
struct operation_context *ctx = operation_new(
(struct ulog *)&object->undo, TEST_ENTRIES,
pmalloc_redo_extend, (ulog_free_fn)pfree,
Expand Down

0 comments on commit a9c8e37

Please sign in to comment.