Last Comment Bug 793387 - Lightning build is broken after Bug 777292 (error: cannot convert from 'int' to 'nsresult')
: Lightning build is broken after Bug 777292 (error: cannot convert from 'int' ...
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Internal Components (show other bugs)
: Lightning 2.0
: All All
: -- normal (vote)
: 2.0
Assigned To: Stefan Sitter
:
Mentors:
Depends on:
Blocks: nsresult-enum
  Show dependency treegraph
 
Reported: 2012-09-22 04:54 PDT by ojab
Modified: 2012-09-24 10:39 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
bustage fix (cast to nsresult) (3.45 KB, patch)
2012-09-22 06:00 PDT, Stefan Sitter
philipp: review+
Details | Diff | Splinter Review

Description ojab 2012-09-22 04:54:35 PDT
c++ -o calPeriod.o -c -I../../../mozilla/dist/stl_wrappers -I../../../mozilla/dist/system_wrappers -include /sources/comm-central/mozilla/config/gcc_hidden.h -DXPI_NAME=lightning -DMOZ_GLUE_IN_PROGRAM -DMOZ_THUNDERBIRD=1 -DOSTYPE=\"Linux3.6\" -DOSARCH=Linux  -I/sources/comm-central/calendar/base/src -I. -I../../../mozilla/dist/include -I../../../mozilla/dist/include/nsprpub  `/home/ojab/opt/mail/mozilla/dist/sdk/bin/nspr-config --prefix=/home/ojab/opt/mail/mozilla/dist --includedir=/home/ojab/opt/mail/mozilla/dist/include/nspr --cflags` -I/home/ojab/opt/mail/mozilla/dist/include/nss      -fPIC  -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -Wno-long-long -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -pthread -pipe  -DNDEBUG -DTRIMMED -g -Os -freorder-blocks  -fomit-frame-pointer   -DMOZILLA_CLIENT -include ../../../comm-config.h -MD -MF .deps/calPeriod.pp /sources/comm-central/calendar/base/src/calPeriod.cpp
calICSService.cpp
/sources/comm-central/calendar/base/src/calDuration.cpp: In member function ‘virtual nsrefcnt calDuration::Release()’:
/sources/comm-central/calendar/base/src/calDuration.cpp:22:1: warning: deleting object of polymorphic class type ‘calDuration’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
/sources/comm-central/calendar/base/src/calPeriod.cpp: In member function ‘virtual nsrefcnt calPeriod::Release()’:
/sources/comm-central/calendar/base/src/calPeriod.cpp:14:1: warning: deleting object of polymorphic class type ‘calPeriod’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
/sources/comm-central/calendar/base/src/calDateTime.cpp: In member function ‘virtual nsresult calDateTime::SetIcalString(const nsACString&)’:
/sources/comm-central/calendar/base/src/calDateTime.cpp:397:45: error: invalid conversion from ‘unsigned int’ to ‘nsresult {aka tag_nsresult}’ [-fpermissive]
Comment 1 Stefan Sitter 2012-09-22 05:29:50 PDT
I think one problem is that we try to return one of the errors from calIErrors.idl instead of a nsresult in a few places: http://mxr.mozilla.org/comm-central/search?string=ICS_ERROR_BASE&find=/calendar/

I'm not sure if the specific returned libical error is evaluated somewhere, if not we could just return e.g. NS_ERROR_FAILURE instead to fix the bustage.
Comment 2 Stefan Sitter 2012-09-22 06:00:24 PDT
Created attachment 663681 [details] [diff] [review]
bustage fix (cast to nsresult)

Looking at nsError.h and calIErrors.idl it seems that the calendar errors are always within the minimum and maximum range of the nsresult enum. Therefore it seems sufficient to just cast to enum.
Comment 3 ojab 2012-09-23 12:27:02 PDT
Fixed in https://hg.mozilla.org/comm-central/rev/2aee2804b79b
Unfortunately cannot change status to FIXED in my own bug, let it be WORKSFORME :|
Comment 4 Stefan Sitter 2012-09-23 15:17:30 PDT
I fixed Thunderbird Windows builds with Bug 793394 but Lightning builds are still broken and still require this patch.
Comment 5 Stefan Sitter 2012-09-24 10:39:19 PDT
Pushed to https://hg.mozilla.org/comm-central/rev/02dce7079e95

Maybe someone can re-trigger the nightly builds otherwise we'll have to wait until tomorrow.

Note You need to log in before you can comment on or make changes to this bug.