Closed
Bug 1113210
Opened 10 years ago
Closed 10 years ago
accessible/atk/AtkSocketAccessible.cpp: unused function 'mai_atk_socket_get_instance_private'
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: keeler, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
774 bytes,
patch
|
tbsaunde
:
review+
|
Details | Diff | Splinter Review |
clang with warnings-as-errors fails with: 13:53.84 /home/keeler/mozilla-central/accessible/atk/AtkSocketAccessible.cpp:54:1: error: unused function 'mai_atk_socket_get_instance_private' [-Werror,-Wunused-function] 13:53.84 G_DEFINE_TYPE_EXTENDED(MaiAtkSocket, mai_atk_socket, 13:53.84 ^ 13:53.84 /usr/include/glib-2.0/gobject/gtype.h:1467:60: note: expanded from macro 'G_DEFINE_TYPE_EXTENDED' 13:53.84 #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() 13:53.84 ^ 13:53.84 /usr/include/glib-2.0/gobject/gtype.h:1677:24: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN' 13:53.84 static inline gpointer \ 13:53.84 ^ 13:53.84 <scratch space>:160:1: note: expanded from here 13:53.84 mai_atk_socket_get_instance_private 13:53.84 ^
Comment 1•10 years ago
|
||
Drive by comment: this might get called via plugin?
Comment 2•10 years ago
|
||
I was going to say that I didn't think this was worth the time to fix, but then I wondered why gcc doesn't warn for this and found that this function is marked with attribute unused to shut gcc up. So it seems like either the gobject macros need fixed, or clang is silly and warns about unused functions with attribute unused. (In reply to David Bolter [:davidb] from comment #1) > Drive by comment: this might get called via plugin? no, this code is for plugins, but its just some part of the weirdo gobject rtti setup.
Assignee | ||
Comment 3•10 years ago
|
||
I wonder why neither Try nor Treeherder builds failed with this error after bug 1110031 landed. An easy fix would be to add the following to accessible/atk/moz.build: > if CONFIG['CLANG_CXX']: > CXXFLAGS += ['-Wno-unused-function']
Assignee | ||
Comment 4•10 years ago
|
||
Suppress -Wunused-function clang warning about accessible/atk/AtkSocketAccessible.cpp's gobject macros
Attachment #8538688 -
Flags: review?(dbolter)
Comment 5•10 years ago
|
||
Comment on attachment 8538688 [details] [diff] [review] 1113210_Wno-unused-function.patch Review of attachment 8538688 [details] [diff] [review]: ----------------------------------------------------------------- Trevor should give this one a think.
Attachment #8538688 -
Flags: review?(dbolter) → review?(tbsaunde+mozbugs)
Comment 6•10 years ago
|
||
Comment on attachment 8538688 [details] [diff] [review] 1113210_Wno-unused-function.patch >+if CONFIG['CLANG_CXX']: >+ CXXFLAGS += ['-Wno-unused-function'] # mai_atk_socket_get_instance_private a longer comment might be nice, but whatever.
Attachment #8538688 -
Flags: review?(tbsaunde+mozbugs) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Thanks. I added a more descriptive comment like you suggested: "Suppress clang warning about unused function from gobject's RTTI macros". https://hg.mozilla.org/integration/mozilla-inbound/rev/6db62626c126
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6db62626c126
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment 9•10 years ago
|
||
@davidb yeah, +1 a11y plugins don't use this API.
You need to log in
before you can comment on or make changes to this bug.
Description
•