Opened 16 years ago
Closed 16 years ago
#3515 closed bug (fixed)
r29382 GCC4 build broken because of string terminated on next line on l2cap_signal.cpp
Reported by: | iFrodo | Owned by: | oruizdorantes |
---|---|---|---|
Priority: | high | Milestone: | R1 |
Component: | Network & Internet/Bluetooth | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
When compiling the following warning/errors appears:
src/add-ons/kernel/network/protocols/l2cap/l2cap_signal.cpp:726:10: warning: missing terminating " character src/add-ons/kernel/network/protocols/l2cap/l2cap_signal.cpp:727:30: warning: missing terminating " character src/add-ons/kernel/network/protocols/l2cap/l2cap_signal.cpp:1090:1: error: unterminated argument list invoking macro "debugf"
After a quick investigation, it appears that it's because the string is terminated on the next line:
Line 726:
debugf("unexpected L2CAP_DisconnectReq. Channel IDs does not match, channel: scid=%d, dcid=%d, request: scid=%d, dcid=%d\n", ch->scid, ch->dcid, scid, dcid);
and the comma at the end of the first line makes the compile think it's the start of ne next argument (I think).
A quick fix is to either not line break, or but a \ at the end of the first line so that the compiler understand that it continues on the next line.
Example:
debugf("unexpected L2CAP_DisconnectReq. Channel IDs does not match, \ channel: scid=%d, dcid=%d, request: scid=%d, dcid=%d\n", ch->scid, ch->dcid, scid, dcid);
Both solutions have been tested and they work fine.
Change History (4)
comment:1 by , 16 years ago
Component: | - General → Drivers/Bluetooth |
---|---|
Owner: | changed from | to
comment:2 by , 16 years ago
Priority: | normal → high |
---|
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Thanks iFrodo for investigation, Sorry that I dont test with GCC4 I will commit a fix as soon as I get home