Closed
Bug 1413064
Opened 8 years ago
Closed 8 years ago
GetCharPref : no Known conversion for argument 2 from 'nsTGetterCopies<char>' to 'nsACString'
Categories
(SeaMonkey :: Build Config, defect)
SeaMonkey
Build Config
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.55
People
(Reporter: ewong, Assigned: ewong)
Details
Attachments
(1 file, 2 obsolete files)
7.36 KB,
patch
|
ewong
:
review+
|
Details | Diff | Splinter Review |
bustage:
/usr/bin/ccache /builds/slave/c-cen-t-lnx-dbg/build/gcc/bin/g++ -m32 -march=pentium-m -std=gnu++11 -o nsSuiteDirectoryProvider.o -c -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/stl_wrappers -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/system_wrappers -include /builds/slave/c-cen-t-lnx-dbg/build/mozilla/config/gcc_hidden.h -DDEBUG=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/slave/c-cen-t-lnx-dbg/build/suite/profile -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/suite/profile -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/include -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/include/nspr -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/slave/c-cen-t-lnx-dbg/build/objdir/mozilla-config.h -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -msse -msse2 -mfpmath=sse -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -D_GLIBCXX_USE_CXX11_ABI=0 -pipe -g -freorder-blocks -Os -fno-omit-frame-pointer -Werror -MD -MP -MF .deps/nsSuiteDirectoryProvider.o.pp /builds/slave/c-cen-t-lnx-dbg/build/suite/profile/nsSuiteDirectoryProvider.cpp
/builds/slave/c-cen-t-lnx-dbg/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as: /lib64/libz.so.1: no version information available (required by /builds/slave/c-cen-t-lnx-dbg/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as)
make[4]: Entering directory `/builds/slave/c-cen-t-lnx-dbg/build/objdir/suite/shell/src'
mkdir -p '.deps/'
/usr/bin/ccache /builds/slave/c-cen-t-lnx-dbg/build/gcc/bin/g++ -m32 -march=pentium-m -std=gnu++11 -o nsGNOMEShellService.o -c -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/stl_wrappers -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/system_wrappers -include /builds/slave/c-cen-t-lnx-dbg/build/mozilla/config/gcc_hidden.h -DDEBUG=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/slave/c-cen-t-lnx-dbg/build/suite/shell/src -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/suite/shell/src -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/include -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/include/nspr -I/builds/slave/c-cen-t-lnx-dbg/build/objdir/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/slave/c-cen-t-lnx-dbg/build/objdir/mozilla-config.h -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -msse -msse2 -mfpmath=sse -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -D_GLIBCXX_USE_CXX11_ABI=0 -pipe -g -freorder-blocks -Os -fno-omit-frame-pointer -Werror -I/builds/slave/c-cen-t-lnx-dbg/build/mozilla/widget/gtk/compat-gtk3 -pthread -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/gtk-3.0/unix-print -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/gtk-3.0 -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/gio-unix-2.0/ -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/cairo -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/pango-1.0 -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/atk-1.0 -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/cairo -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/pixman-1 -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/gdk-pixbuf-2.0 -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/include/glib-2.0 -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/local/lib/glib-2.0/include -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/include/freetype2 -I/builds/slave/c-cen-t-lnx-dbg/build/gtk3/usr/include/libpng12 -MD -MP -MF .deps/nsGNOMEShellService.o.pp /builds/slave/c-cen-t-lnx-dbg/build/suite/shell/src/nsGNOMEShellService.cpp
/builds/slave/c-cen-t-lnx-dbg/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as: /lib64/libz.so.1: no version information available (required by /builds/slave/c-cen-t-lnx-dbg/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as)
../../../suite/profile/nsSuiteDirectoryProvider.cpp: In member function 'void nsSuiteDirectoryProvider::AppendDistroSearchDirs(nsIProperties*, nsCOMArray<nsIFile>&)':
../../../suite/profile/nsSuiteDirectoryProvider.cpp:268:80: error: no matching function for call to 'nsIPrefBranch::GetCharPref(const char [25], nsTGetterCopies<char>)'
rv = prefs->GetCharPref("general.useragent.locale", getter_Copies(locale));
^
../../../suite/profile/nsSuiteDirectoryProvider.cpp:268:80: note: candidate is:
In file included from ../../../suite/profile/nsSuiteDirectoryProvider.cpp:10:0:
../../dist/include/nsIPrefBranch.h:64:20: note: virtual nsresult nsIPrefBranch::GetCharPref(const char*, nsACString&)
NS_IMETHOD GetCharPref(const char * aPrefName, nsACString & _retval) = 0;
^
../../dist/include/nsIPrefBranch.h:64:20: note: no known conversion for argument 2 from 'nsTGetterCopies<char>' to 'nsACString& {aka nsTSubstring<char>&}'
../../../suite/profile/nsSuiteDirectoryProvider.cpp:288:53: error: no matching function for call to 'nsIPrefBranch::GetCharPref(const char [41], nsTGetterCopies<char>)'
getter_Copies(defLocale));
^
../../../suite/profile/nsSuiteDirectoryProvider.cpp:288:53: note: candidate is:
In file included from ../../../suite/profile/nsSuiteDirectoryProvider.cpp:10:0:
../../dist/include/nsIPrefBranch.h:64:20: note: virtual nsresult nsIPrefBranch::GetCharPref(const char*, nsACString&)
NS_IMETHOD GetCharPref(const char * aPrefName, nsACString & _retval) = 0;
^
../../dist/include/nsIPrefBranch.h:64:20: note: no known conversion for argument 2 from 'nsTGetterCopies<char>' to 'nsACString& {aka nsTSubstring<char>&}'
make[4]: Leaving directory `/builds/slave/c-cen-t-lnx-dbg/build/objdir/suite/profile'
make[4]: *** [nsSuiteDirectoryProvider.o] Error 1
make[3]: *** [suite/profile/target] Error 2
![]() |
Assignee | |
Comment 1•8 years ago
|
||
Comment on attachment 8923645 [details] [diff] [review]
proposed patch
>+++ b/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
>@@ -184,17 +184,19 @@ nsNetscapeProfileMigratorBase::CopyHomeP
> xform->sourcePrefName, value); \
> } \
> return NS_OK;
>
> nsresult
> nsNetscapeProfileMigratorBase::GetString(PrefTransform* aTransform,
> nsIPrefBranch* aBranch)
> {
>- GETPREF(aTransform, GetCharPref, &aTransform->stringValue)
>+ nsCString str;
>+ GETPREF(aTransform, GetCharPref, str);
>+ aTransform->stringValue = moz_xstrdup(str.get());
> }
See https://hg.mozilla.org/comm-central/rev/fba3fa2958e7
So something like:
+ PrefTransform* xform = (PrefTransform*)aTransform;
+ nsCString str;
+ nsresult rv = aBranch->GetCharPref(xform->sourcePrefName, str);
+ if (NS_SUCCEEDED(rv)) {
+ xform->prefHasValue = true;
+ xform->stringValue = moz_xstrdup(str.get());
+ }
+ return rv;
> switch (type) {
>- case nsIPrefBranch::PREF_STRING:
>- rv = branch->GetCharPref(currPref, &pref->stringValue);
>+ case nsIPrefBranch::PREF_STRING: {}
Nit: extra }
>+ nsCString str;
>+ rv = branch->GetCharPref(currPref, str);
>+ pref->stringValue = moz_xstrdup(str.get(()));
> break;
>+ }
r=me with those fixed / tested.
Attachment #8923645 -
Flags: review?(iann_bugzilla) → review+
![]() |
Assignee | |
Comment 3•8 years ago
|
||
Attachment #8923645 -
Attachment is obsolete: true
Attachment #8923650 -
Flags: review+
![]() |
Assignee | |
Comment 4•8 years ago
|
||
Attachment #8923650 -
Attachment is obsolete: true
Attachment #8923674 -
Flags: review?(iann_bugzilla)
![]() |
Assignee | |
Updated•8 years ago
|
Attachment #8923674 -
Flags: review?(iann_bugzilla) → review+
Pushed by ewong@pw-wspx.org:
https://hg.mozilla.org/comm-central/rev/3558bc891997
Update suite/ for nsIPrefBranch.idl changes. r=IanN
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
![]() |
Assignee | |
Updated•8 years ago
|
Target Milestone: --- → seamonkey2.55
You need to log in
before you can comment on or make changes to this bug.
Description
•