cookyshi / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

mediasession_unittest.cc does not compile with gcc 4.5+ #275

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile libjingle with gcc 4.5 or later

What is the expected output? What do you see instead?
Rather than a successful compile, I get this:

________Compiling build/dbg/obj/session/phone/mediasession_unittest.o
cc1plus: warnings being treated as errors
session/phone/mediasession_unittest.cc: In member function ‘virtual void 
MediaSessionDescriptionFactoryTest_TestCreateAudioOffer_Test::TestBody()’:
session/phone/mediasession_unittest.cc:211:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc: In member function ‘virtual void 
MediaSessionDescriptionFactoryTest_TestCreateVideoOffer_Test::TestBody()’:
session/phone/mediasession_unittest.cc:237:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:243:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc: In member function ‘virtual void 
MediaSessionDescriptionFactoryTest_TestCreateAudioAnswer_Test::TestBody()’:
session/phone/mediasession_unittest.cc:267:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc: In member function ‘virtual void 
MediaSessionDescriptionFactoryTest_TestCreateVideoAnswer_Test::TestBody()’:
session/phone/mediasession_unittest.cc:295:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:300:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc: In member function ‘virtual void 
MediaSessionDescriptionFactoryTest_TestCreateMultiStreamVideoOffer_Test::TestBod
y()’:
session/phone/mediasession_unittest.cc:450:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:454:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:486:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:488:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc: In member function ‘virtual void 
MediaSessionDescriptionFactoryTest_TestCreateMultiStreamVideoAnswer_Test::TestBo
dy()’:
session/phone/mediasession_unittest.cc:538:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:539:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:581:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
session/phone/mediasession_unittest.cc:583:3: error: converting ‘false’ to 
pointer type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’

What version of the product are you using? On what operating system?
SVN r106, Fedora 14.

Please provide any additional information below.

Original issue reported on code.google.com by bprodo...@connectify.me on 12 Jan 2012 at 1:48

GoogleCodeExporter commented 9 years ago
Please find attached a patch to fix this problem (as well as a typo when 
HAVE_SRTP is not defined)

Original comment by victor.l...@gmail.com on 16 Feb 2012 at 9:09

Attachments:

GoogleCodeExporter commented 9 years ago
Excellent, that did the trick.  talk/xmllite/xmlnsstack_unittest.cc suffered 
from a very similar problem.  The attached patch combines your fix with the fix 
for xmlnsstack_unittest.cc.

Original comment by bprodo...@connectify.me on 17 Feb 2012 at 2:30

Attachments: