Fix Blob_t vs ContactBlob type differences#68
Conversation
These structs are defined differently with a potentially different memory layouts so they cannot be treated as the same.
|
I should mention that I've only compiled this patch, but I haven't tested it (though it's quite simple to inspect). |
|
Your proposed change is valid and good. For the Arch Linux package jpilot I simply used a sed 's/return Contact_add_blob(c, blob);/return Contact_add_blob(c, (void*)blob);/' jp-contact.c > /tmp/jp-contact.cThe problem you addressed here is a permanent nuisance between the different versions of pilot-link.
extern int Contact_add_blob
PI_ARGS((struct Contact *, Blob_t *));
int Contact_add_blob(struct Contact *c, Blob_t *blob) { ... }
extern int Contact_add_blob
PI_ARGS((struct Contact *, struct ContactBlob *));I assume your distros uses the same mess. So, for me it looks that we are fixing something in J-Pilot that should be fixed in pilot-link's repositories for the various distros. |
|
My distro, as well as https://github.com/jichu4n/pilot-link/, both have |
|
"Your" repository from jichu4n is 9 years old. Please have a look at the history of I consider desrod's repository to be the "official" pilot-link repository. However, not everyone agrees with that. |
|
The warning for gcc 15 has been fixed in master. Please verify and test if you are able. |
@eklausme Thank you for your support! Project forks are fine, and I encourage them, as they help build momentum behind new ideas, but when someone decides their fork is suddenly the main project location, that's where I push back. desrod/pilot-link is, and has always been the main project development source tree (well, since I moved it from CVS to Git). It's been too many years I've had to step away from the project due to personal and professional commitments, but I'm back, actively developing and updating the code. I've made 54 commits in the last week to bring it to current, squash dozens of warnings, closed long-standing memory leak and code-level issues that passed many eyes without being caught. I'm waiting to take receipt of a Centro device from a community member to test some last-mile issues with text messages, and then I'll close the remaining PRs/issues, and push a 0.15.0 release. PR #76 I just pushed also ensures J-Pilot builds clean on Linux and macOS, and against the 0.15.0 API/ABI, which brings these both back into congruence. |
These structs are defined differently with a potentially different
memory layouts so they cannot be treated as the same.
This difference causes a compile failure with gcc 15.1