| Summary: | [GTK] return-type-c-linkage warnings | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Philippe Normand <pnormand> | ||||
| Component: | WebKitGTK | Assignee: | Philippe Normand <pnormand> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | berto, bugs-noreply, cgarcia, ews-watchlist, gustavo | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
I guess it's because of the G_BEGIN_DECLS. This is a private object that is always going to be used from C++ code, so I guess we can just remove the G_BEGIN_DECLS/G_END_DECLS. Could you try remove those to confirm that fixes the warning? That's the fix indeed. Good guess! (In reply to Philippe Normand from comment #2) > That's the fix indeed. Good guess! Hum, sorry false alarm. I still see the warning. I'll check it further. Misread the output, the same issue appears in WebKitDirectoryInputStream.h, removing G_*_DECLS in both files is the way to go. Sending patch (In reply to Philippe Normand from comment #3) > (In reply to Philippe Normand from comment #2) > > That's the fix indeed. Good guess! > > Hum, sorry false alarm. I still see the warning. I'll check it further. Maybe the one you are seeing now is from WebKitFormDataInputStream.h? Created attachment 418713 [details]
Patch
Comment on attachment 418713 [details]
Patch
Thanks!
Committed r272057: <https://trac.webkit.org/changeset/272057> All reviewed patches have been landed. Closing bug and clearing flags on attachment 418713 [details]. |
When building with clang: In file included from ../../Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp:37: ../../Source/WebKit/NetworkProcess/soup/WebKitDirectoryInputStream.h:57:23: warning: 'webkitDirectoryInputStreamNew' has C-linkage specified, but returns user-defined type 'GRefPtr<GInputStream>' (aka 'GRefPtr<_GInputStream>') which is incompatible with C [-Wreturn-type-c-linkage] GRefPtr<GInputStream> webkitDirectoryInputStreamNew(GRefPtr<GFileEnumerator>&&, CString&& uri); ^ 1 warning generated. [6362/6762] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-10.cpp.o In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-10.cpp:1: In file included from ../../Source/WebKit/NetworkProcess/soup/WebKitDirectoryInputStream.cpp:27: ../../Source/WebKit/NetworkProcess/soup/WebKitDirectoryInputStream.h:57:23: warning: 'webkitDirectoryInputStreamNew' has C-linkage specified, but returns incomplete type 'GRefPtr<GInputStream>' (aka 'GRefPtr<_GInputStream>') which could be incompatible with C [-Wreturn-type-c-linkage] GRefPtr<GInputStream> webkitDirectoryInputStreamNew(GRefPtr<GFileEnumerator>&&, CString&& uri); ^