Skip to content

Make error - incompatible pointer type is passed inside on_auth_success function #94

Description

@pursvir
[  3%] Generating windows-tz-map.c
[  7%] Building C object CMakeFiles/focal.dir/src/account-edit-dialog.c.o
/tmp/focal/src/account-edit-dialog.c: In function ‘open_web_login’:
/tmp/focal/src/account-edit-dialog.c:50:47: error: passing argument 2 of ‘remote_auth_new_request’ from incompatible pointer type [-Wincompatible-pointer-types]
   50 |         remote_auth_new_request(dialog->auth, on_auth_success, dialog, NULL);
      |                                               ^~~~~~~~~~~~~~~
      |                                               |
      |                                               void (*)(AccountEditDialog *) {aka void (*)(struct _AccountEditDialog *)}
In file included from /tmp/focal/src/remote-auth-oauth2.h:17,
                 from /tmp/focal/src/account-edit-dialog.c:18:
/tmp/focal/src/remote-auth.h:48:53: note: expected ‘void (*)(void)’ but argument is of type ‘void (*)(AccountEditDialog *)’ {aka ‘void (*)(struct _AccountEditDialog *)’}
   48 | void remote_auth_new_request(RemoteAuth* ba, void (*callback)(), void* user, void* arg);
      |                                              ~~~~~~~^~~~~~~~~~~
/tmp/focal/src/account-edit-dialog.c:34:13: note: ‘on_auth_success’ declared here
   34 | static void on_auth_success(AccountEditDialog* dialog)
      |             ^~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/focal.dir/build.make:83: CMakeFiles/focal.dir/src/account-edit-dialog.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/focal.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions