Simple Compiling Errors

If someone could tell me if I can just skip these errors and continue to compile, would be grateful and if you want to take a look at my code, and point out the problems that would be great! Thanks.
Source here - http://codeviewer.org/view/code:2031
Errors:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
botbuild.c:47:6: warning: conflicting types for built-in function ‘pow’ [enabled by default]
botbuild.c: In function ‘getspoofs’:
botbuild.c:107:30: warning: missing terminating " character [enabled by default]
botbuild.c:107:2: error: missing terminating " character
botbuild.c:108:1: error: expected expression before ‘%’ token
botbuild.c:108:1: error: stray ‘\’ in program
botbuild.c:108:14: warning: missing terminating " character [enabled by default]
botbuild.c:108:1: error: missing terminating " character
botbuild.c:111:13: warning: missing terminating " character [enabled by default]
botbuild.c:111:3: error: missing terminating " character
botbuild.c:112:1: error: stray ‘\’ in program
botbuild.c:112:14: warning: missing terminating " character [enabled by default]
botbuild.c:112:1: error: missing terminating " character
botbuild.c:147:13: warning: missing terminating " character [enabled by default]
botbuild.c:147:3: error: missing terminating " character
botbuild.c:148:1: error: stray ‘\’ in program
botbuild.c:148:9: warning: missing terminating " character [enabled by default]
botbuild.c:148:1: error: missing terminating " character
botbuild.c:458:12: warning: missing terminating " character [enabled by default]
botbuild.c:458:2: error: missing terminating " character
botbuild.c:459:1: error: stray ‘\’ in program
botbuild.c:459:31: warning: missing terminating " character [enabled by default]
botbuild.c:459:1: error: missing terminating " character
botbuild.c:460:12: warning: missing terminating " character [enabled by default]
botbuild.c:460:2: error: missing terminating " character
botbuild.c:461:1: error: stray ‘\’ in program
botbuild.c:461:9: warning: missing terminating " character [enabled by default]
botbuild.c:461:1: error: missing terminating " character
botbuild.c:462:12: warning: missing terminating " character [enabled by default]
botbuild.c:462:2: error: missing terminating " character
botbuild.c:463:1: error: stray ‘\’ in program
botbuild.c:463:11: warning: missing terminating " character [enabled by default]
botbuild.c:463:1: error: missing terminating " character
botbuild.c:464:12: warning: missing terminating " character [enabled by default]
botbuild.c:464:2: error: missing terminating " character
botbuild.c:465:1: error: stray ‘\’ in program
botbuild.c:465:38: warning: missing terminating " character [enabled by default]
botbuild.c:465:1: error: missing terminating " character
botbuild.c:466:12: warning: missing terminating " character [enabled by default]
botbuild.c:466:2: error: missing terminating " character
botbuild.c:467:1: error: stray ‘\’ in program
botbuild.c:467:10: warning: missing terminating " character [enabled by default]
botbuild.c:467:1: error: missing terminating " character
botbuild.c:468:12: warning: missing terminating " character [enabled by default]
botbuild.c:468:2: error: missing terminating " character
botbuild.c:469:1: error: stray ‘\’ in program
botbuild.c:469:9: warning: missing terminating " character [enabled by default]
botbuild.c:469:1: error: missing terminating " character
botbuild.c:472:12: warning: missing terminating " character [enabled by default]
botbuild.c:472:2: error: missing terminating " character
botbuild.c:473:1: error: stray ‘\’ in program
botbuild.c:473:6: warning: missing terminating " character [enabled by default]
botbuild.c:473:1: error: missing terminating " character
botbuild.c:474:12: warning: missing terminating " character [enabled by default]
botbuild.c:474:2: error: missing terminating " character
botbuild.c:475:1: error: stray ‘\’ in program
botbuild.c:475:9: warning: missing terminating " character [enabled by default]
botbuild.c:475:1: error: missing terminating " character
botbuild.c:476:12: warning: missing terminating " character [enabled by default]
botbuild.c:476:2: error: missing terminating " character
botbuild.c:477:1: error: stray ‘\’ in program
botbuild.c:477:10: warning: missing terminating " character [enabled by default]
botbuild.c:477:1: error: missing terminating " character
botbuild.c:478:12: warning: missing terminating " character [enabled by default]
botbuild.c:478:2: error: missing terminating " character
botbuild.c:479:1: error: stray ‘\’ in program
botbuild.c:479:12: warning: missing terminating " character [enabled by default]
botbuild.c:479:1: error: missing terminating " character
botbuild.c:480:12: warning: missing terminating " character [enabled by default]
botbuild.c:480:2: error: missing terminating " character
botbuild.c:481:1: error: stray ‘\’ in program
botbuild.c:481:9: warning: missing terminating " character [enabled by default]
botbuild.c:481:1: error: missing terminating " character
botbuild.c:482:12: warning: missing terminating " character [enabled by default]
botbuild.c:482:2: error: missing terminating " character
botbuild.c:483:1: error: stray ‘\’ in program
botbuild.c:483:19: warning: missing terminating " character [enabled by default]
botbuild.c:483:1: error: missing terminating " character
botbuild.c:484:12: warning: missing terminating " character [enabled by default]
botbuild.c:484:2: error: missing terminating " character
botbuild.c:485:1: error: stray ‘\’ in program
botbuild.c:485:14: warning: missing terminating " character [enabled by default]
botbuild.c:485:1: error: missing terminating " character
botbuild.c:486:12: warning: missing terminating " character [enabled by default]
botbuild.c:486:2: error: missing terminating " character
botbuild.c:487:1: error: stray ‘\’ in program
botbuild.c:487:9: warning: missing terminating " character [enabled by default]
botbuild.c:487:1: error: missing terminating " character
botbuild.c:533:52: warning: missing terminating " character [enabled by default]
botbuild.c:533:2: error: missing terminating " character
botbuild.c:534:1: error: stray ‘\’ in program
botbuild.c:534:1: error: stray ‘\’ in program
botbuild.c:534:13: warning: missing terminating " character [enabled by default]
botbuild.c:534:1: error: missing terminating " character
botbuild.c:616:15: warning: missing terminating " character [enabled by default]
botbuild.c:616:5: error: missing terminating " character
botbuild.c:617:1: error: stray ‘\’ in program
botbuild.c:617:30: warning: missing terminating " character [enabled by default]
botbuild.c:617:1: error: missing terminating " character
botbuild.c:779:1: error: expected declaration or statement at end of input
Last edited on
You can't skip them. You have to fix the errors.

botbuild.c:47:6: warning: conflicting types for built-in function ‘pow’ [enabled by default]

Sounds like your compiler already provides a pow function and you're conflicting with it. Just use the one provided.

1
2
if (spoofsm == 1) Send(sock,"NOTICE %s :Spoofs: 
%d.%d.%d.%d\n",sender,((u_char*)&a)[3],((u_char*)&a)[2],((u_char*)&a)[1],((u_char*)&a)[0]);


String literals don't cross lines. You have to use this instead:

1
2
if (spoofsm == 1) Send(sock,"NOTICE %s :Spoofs: "
"%d.%d.%d.%d\n",sender,((u_char*)&a)[3],((u_char*)&a)[2],((u_char*)&a)[1],((u_char*)&a)[0]);

Likewise on a million other lines.

Last edited on
Ahh, thank you so much for replying so quickly. I didn't realize that. Thank you, very much. Also I was compiling within Linux, using GCC. Actually it was all just a miss typing it should have been.
if (spoofsm == 1) Send(sock,"NOTICE %s :Spoofs: %d.%d.%d.%d\n",sender,((u_char*)&a)[3],((u_char*)&a)[2],((u_char*)&a [1],((u_char*)&a)[0]);
If I was to add in the " it would completely morph my function and cause it to not work properly, but from what you told me I was able to figure it out. If I'm not correct please let me know, because I'm having some more errors, like.
1
2
3
botbuild.c: In function ‘getspoofs’:
botbuild.c:105:44: error: unused parameter ‘argc’ [-Werror=unused-parameter]
botbuild.c:105:57: error: unused parameter ‘argv’ [-Werror=unused-parameter]
Last edited on
If I was to add in the " it would completely morph my function and cause it to not work properly,

I disagree. The compiler sees multiple sting literal in consecutive lines and joins them together for you.


Those are warnings that you have elevated to the status of errors by using -Werror=unused-parameter in your compile command. Either remove the parameters you never use, or turn off the -Werror=unused-parameter
Last edited on
Ahh, hmm. Let me test this right quick. Although what I did it made the error of " disappear. Also I went ahead and turned off warnings about the unused parameter's and suppressed my warning about "pow" so I could build it. Now I did examine other parts of my code that function pretty much the same way as the 1s that I got the missing close of function error on (The 1 I compared it to I didn't have any errors on) & what I did was correct.
Last edited on
Now see if I was to do line 460, & 461 like that I don't see how it would be able to even function properly here is what it looks like after I do what you tell me to do. Which takes out the errors, but I don't see how it could function properly. Given these are supposed to be all one statement here.
1
2
Send(sock,"NOTICE %s :NICK <nick>                                      = Changes the nick of the "
"knight\n",sender); sleep(2);

Original -
1
2
Send(sock,"NOTICE %s :NICK <nick>                                      = Changes the nick of the 
knight\n",sender); sleep(2);

What I would do, which seems correct, takes out the errors.
Send(sock,"NOTICE %s :NICK <nick> = Changes the nick of the knight\n",sender); sleep(2);
I did fix it up my way but I got some errors when I ran it about IP and then some address points.
Last edited on
Topic archived. No new replies allowed.