-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The compiler hates this, spits out tons of errors #3
Comments
Had a chance to chat on Discord in GBADEV. This user copied the sources into their project and redefined a few things in the global namespace the project relies on. They were able to build the project on its own no problem standalone. I'd close this as a non-issue. |
I'd like to know what those things are though, otherwise I still can't use
it.
My code is mostly the tonc big map demo, so very little is my own
definitions.
…On Sun, 17 Mar 2024 at 06:08, aronson ***@***.***> wrote:
Had a chance to chat on Discord in GBADEV. This user copied the sources
into their project and redefined a few things in the global namespace the
project relies on. They were able to build the project on its own no
problem standalone. I'd close this as a non-issue.
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF26DTBMJEZV4LZQZC6RQZDYYVTQ7AVCNFSM6AAAAABEJYE4MGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGM4TCNJYGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I gave you detailed instructions on Discord on how everyone else has been using this with success. If you "still can't use it" after that, I'm going to wager the issue is lack of expending effort in lieu of meaningful feedback. As I said before, you cannot expect to copy an entire library into a foreign source tree and expect it to work. This is not the fault of the library. This is on you, the developer. I understand you copied someone else's code, why you don't copy someone else's general workflow and link the binary? If you really want to solve it on your own, here's all your issues from your compiler output summarized with clear descriptions of the problem: 1. Mismatch in
|
as stated in the discord, I have no idea what any of that means. There's no
suggestions in that in how to actually fix those errors.
the library is useless to me if it's giving me these kinds of errors.
I SHOULD be able to copy it into a folder and it compile without even being
included, especially with tonc's demos.
" why you don't copy someone else's general workflow and link the binary?"
What? I don't even know what that means
I think you're overestimating my skill level here, then blaming me for
things I clearly have no idea how they happened.
…On Sun, 17 Mar 2024 at 11:21, aronson ***@***.***> wrote:
I still can't use it
I gave you detailed instructions on Discord on how everyone else has been
using this with success. If you "still can't use it" after that, I'm going
to wager the issue is lack of expending effort.
As I said before, you cannot expect to copy an entire library into a
foreign source tree and expect it to work. This is not the fault of the
library. This is on you, the developer. I understand you copied someone
else's code, why you don't copy someone else's general workflow and link
the binary?
If you really want to solve it on your own, here's all your issues from
your compiler output summarized with clear descriptions of the problem:
1. Mismatch in flash_absmemcmp Function Calls
- *Issue*: The function expects arguments of type const volatile
unsigned char *, but arguments of type const char * and char * are
passed instead.
- *Example Warning*: pointer targets in passing argument 2 of
'flash_absmemcmp' differ in signedness [-Wpointer-sign]
2. Mismatch in wait_until Function Calls
- *Issue*: The function expects arguments of type const char *, but
arguments of type const unsigned char * and u8 * (aka unsigned char *)
are passed instead.
- *Example Warning*: pointer targets in passing argument 2 of
'wait_until' differ in signedness [-Wpointer-sign]
3. Mismatch in flash_memcpy Function Calls
- *Issue*: The function expects the first argument of type volatile
unsigned char *, but an argument of type char * is passed instead.
- *Example Warning*: pointer targets in passing argument 1 of
'flash_memcpy' differ in signedness [-Wpointer-sign]
4. Mismatch in sram_memcpy Function Calls
- *Issue*: Similar to flash_memcpy, the function expects the first
argument of type volatile unsigned char * and the second argument of
type const volatile unsigned char *, but arguments of type char * are
passed instead.
- *Example Warning*: pointer targets in passing argument 1 of
'sram_memcpy' differ in signedness [-Wpointer-sign]
5. Mismatch in sram_absmemcmp Function Calls
- *Issue*: The function expects arguments of type const volatile
unsigned char *, but arguments of type char * are passed instead.
- *Example Warning*: pointer targets in passing argument 2 of
'sram_absmemcmp' differ in signedness [-Wpointer-sign]
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF26DTH4VTYR27CHBIL7UYLYYWYJNAVCNFSM6AAAAABEJYE4MGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGUYDOMRYHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Reposting what I posted in Discord so that anyone who runs into this in the future can avoid all these errors:
Good luck on your projects! 😄 |
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c: In function 'wait_until':
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:75:99: warning: pointer targets in passing argument 2 of 'flash_absmemcmp' differ in signedness [-Wpointer-sign]
75 | for (vu32 i = 0; i < LOOP_CNT_PER_MILLI_SECOND * timeout && flash_absmemcmp(&flash_mem[addr], data, 1); i++);
| ^~~~
| |
| const char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:57:102: note: expected 'const volatile unsigned char *' but argument is of type 'const char *'
57 | static unsigned int flash_absmemcmp(const volatile unsigned char *dst, const volatile unsigned char *src, size_t size) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:77:43: warning: pointer targets in passing argument 2 of 'flash_absmemcmp' differ in signedness [-Wpointer-sign]
77 | if (flash_absmemcmp(&flash_mem[addr], data, 1)) {
| ^~~~
| |
| const char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:57:102: note: expected 'const volatile unsigned char *' but argument is of type 'const char *'
57 | static unsigned int flash_absmemcmp(const volatile unsigned char *dst, const volatile unsigned char *src, size_t size) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c: In function 'flash_reset':
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:143:25: warning: pointer targets in passing argument 2 of 'wait_until' differ in signedness [-Wpointer-sign]
143 | err = wait_until(0, &erased_byte_value, 20);
| ^~~~~~~~~~~~~~~~~~
| |
| const unsigned char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:74:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
74 | static int wait_until(u32 addr, const char *data, int timeout) {
| ~~~~~~~~~~~~^~~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:146:30: warning: pointer targets in passing argument 2 of 'wait_until' differ in signedness [-Wpointer-sign]
146 | return wait_until(0, &erased_byte_value_vba, 20);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| const unsigned char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:74:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
74 | static int wait_until(u32 addr, const char *data, int timeout) {
| ~~~~~~~~~~~~^~~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c: In function 'flash_erase':
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:166:28: warning: pointer targets in passing argument 2 of 'wait_until' differ in signedness [-Wpointer-sign]
166 | err = wait_until(addr, &erased_byte_value, 20);
| ^~~~~~~~~~~~~~~~~~
| |
| const unsigned char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:74:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
74 | static int wait_until(u32 addr, const char *data, int timeout) {
| ~~~~~~~~~~~~^~~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:169:30: warning: pointer targets in passing argument 2 of 'wait_until' differ in signedness [-Wpointer-sign]
169 | return wait_until(0, &erased_byte_value_vba, 20);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| const unsigned char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:74:45: note: expected 'const char *' but argument is of type 'const unsigned char *'
74 | static int wait_until(u32 addr, const char *data, int timeout) {
| ~~~~~~~~~~~~^~~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c: In function 'flash_read':
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:210:18: warning: pointer targets in passing argument 1 of 'flash_memcpy' differ in signedness [-Wpointer-sign]
210 | flash_memcpy(data, &flash_mem[addr], size);
| ^~~~
| |
| char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:51:50: note: expected 'volatile unsigned char *' but argument is of type 'char *'
51 | static void flash_memcpy(volatile unsigned char *dst, const volatile unsigned char *src, size_t size) {
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c: In function 'flash_write_byte':
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:224:29: warning: pointer targets in passing argument 2 of 'wait_until' differ in signedness [-Wpointer-sign]
224 | return wait_until(addr, &data, 20);
| ^~~~~
| |
| u8 * {aka unsigned char *}
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:74:45: note: expected 'const char *' but argument is of type 'u8 *' {aka 'unsigned char *'}
74 | static int wait_until(u32 addr, const char *data, int timeout) {
| ~~~~~~~~~~~~^~~~
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c: In function 'flash_write':
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:346:43: warning: pointer targets in passing argument 2 of 'flash_absmemcmp' differ in signedness [-Wpointer-sign]
346 | if (flash_absmemcmp(&flash_mem[addr], data, size))
| ^~~~
| |
| char *
E:/VB6/GBA/Projects/Awakening/source/gba_flash.c:57:102: note: expected 'const volatile unsigned char *' but argument is of type 'char *'
57 | static unsigned int flash_absmemcmp(const volatile unsigned char *dst, const volatile unsigned char *src, size_t size) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
gba_sram.c
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c: In function 'sram_read':
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c:35:17: warning: pointer targets in passing argument 1 of 'sram_memcpy' differ in signedness [-Wpointer-sign]
35 | sram_memcpy(data, &sram_mem[addr], size);
| ^~~~
| |
| char *
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c:8:49: note: expected 'volatile unsigned char *' but argument is of type 'char *'
8 | static void sram_memcpy(volatile unsigned char *dst, const volatile unsigned char *src, size_t size) {
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c: In function 'sram_write':
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c:50:34: warning: pointer targets in passing argument 2 of 'sram_memcpy' differ in signedness [-Wpointer-sign]
50 | sram_memcpy(&sram_mem[addr], data, size);
| ^~~~
| |
| char *
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c:8:84: note: expected 'const volatile unsigned char *' but argument is of type 'char *'
8 | static void sram_memcpy(volatile unsigned char *dst, const volatile unsigned char *src, size_t size) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c:52:41: warning: pointer targets in passing argument 2 of 'sram_absmemcmp' differ in signedness [-Wpointer-sign]
52 | if (sram_absmemcmp(&sram_mem[addr], data, size))
| ^~~~
| |
| char *
E:/VB6/GBA/Projects/Awakening/source/gba_sram.c:14:101: note: expected 'const volatile unsigned char *' but argument is of type 'char *'
14 | static unsigned int sram_absmemcmp(const volatile unsigned char *dst, const volatile unsigned char *src, size_t size) {
The text was updated successfully, but these errors were encountered: