r29382 GCC4 build broken because of string terminated on next line on l2cap_signal.cpp
|Reported by:||iFrodo||Owned by:||oruizdorantes|
|Component:||Network & Internet/Bluetooth||Version:||R1/pre-alpha1|
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:
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.
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.