Closed Bug 1345977 Opened 7 years ago Closed 7 years ago

PTestSyncHangChild.h:134:11: error: private field 'mState' is not used

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

In a build with --enable-ipdl-tests and --enable-warnings-as-errors, the compiler complains about PTestSyncHangChild and PTestSyncHangParent each having a private unused field |State mState|. Bug 1342580 removed a useless accessor method, which I think stopped this warning from happening before. I assume this class hits the error and others don't because it is such a minimal class that it doesn't general any code that sends a message. I guess I can just add a dummy message.
Comment on attachment 8846183 [details]
Bug 1345977 - Add unused message to PTestSyncHang to prevent compiler warning.

https://reviewboard.mozilla.org/r/119282/#review121654

::: ipc/ipdl/test/cxx/PTestSyncHang.ipdl:13
(Diff revision 1)
>  child:
> +    // Add this unused message so we don't get compiler errors
> +    // complaining that mState is an unused private field.
> +    async UnusedMessage();
> +
>      async __delete__();

Can you remove __delete__ as well? I don't think it makes any sense in a top-level protocol.
Attachment #8846183 - Flags: review?(wmccloskey) → review+
(In reply to Bill McCloskey (:billm) from comment #2)
> Can you remove __delete__ as well? I don't think it makes any sense in a
> top-level protocol.

Done. I also filed bug 1346911 to make that an error.
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55359c6c4724
Add unused message to PTestSyncHang to prevent compiler warning. r=billm
https://hg.mozilla.org/mozilla-central/rev/55359c6c4724
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: