-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Compile error #5
Comments
Those are warnings caused by sloppy code. They shouldn't cause the problem
that you're describing.
If you'd like to resolve it, the best way would be to put some "printf"
statements in the code to see which lines are being executed and what are
the values of variables.
pt., 16 sie 2019, 06:02 użytkownik schraederb <notifications@github.com>
napisał:
… When I go to compile I get the following:
g600.c: In function ‘ends_with’:
g600.c:66:25: warning: initialization of ‘size_t’ {aka ‘long unsigned
int’} from ‘const char *’ makes integer from pointer without a cast
[-Wint-conversion]
size_t haystack_end = haystack + haystack_length - suffix_length;
^~~~~~~~
g600.c:67:26: warning: passing argument 2 of ‘strncmp’ makes pointer from
integer without a cast [-Wint-conversion]
return strncmp(suffix, haystack_end, suffix_length) == 0;
^~~~~~~~~~~~
In file included from g600.c:4:
/usr/include/string.h:139:51: note: expected ‘const char *’ but argument
is of type ‘size_t’ {aka ‘long unsigned int’}
extern int strncmp (const char *__s1, const char *__s2, size_t __n)
~~~~~~~~~~~~^~~~
g600.c: In function ‘main’:
g600.c:102:30: warning: passing argument 1 of ‘find_g600’ from
incompatible pointer type [-Wincompatible-pointer-types]
int find_error = find_g600(&path);
^~~~~
g600.c:71:21: note: expected ‘char *’ but argument is of type ‘char (*
)[1024]’
int find_g600(char *path) {
~~~~~~^~~~
and then when I try to run the program it acts like it is running fine,
but the keys are not changed from the defaults. This could easily be me not
doing something correctly, but I appreciate any insight.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AACLVGTSIZO3HGAYYREJ2I3QEYRG3A5CNFSM4IMDZ7M2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFSCCOQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACLVGWSWXB7SQNWE4F3WKDQEYRG3ANCNFSM4IMDZ7MQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I go to compile I get the following:
and then when I try to run the program it acts like it is running fine, but the keys are not changed from the defaults. This could easily be me not doing something correctly, but I appreciate any insight.
The text was updated successfully, but these errors were encountered: