Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f6dda4e1
Kaydet (Commit)
f6dda4e1
authored
May 30, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make loplugin:redundantcast accept bool(FD_ISSET(...)) again
Change-Id: I4e96c55c246cf806f17df31844a00d0e8a5e4f56
üst
db38e3f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
redundantcast.cxx
compilerplugins/clang/redundantcast.cxx
+24
-0
socket.cxx
sal/osl/unx/socket.cxx
+1
-1
No files found.
compilerplugins/clang/redundantcast.cxx
Dosyayı görüntüle @
f6dda4e1
...
@@ -483,6 +483,30 @@ bool RedundantCast::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * exp
...
@@ -483,6 +483,30 @@ bool RedundantCast::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * exp
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/svx/source/tbxctrls/fillctrl.cxx"
))
if
(
loplugin
::
hasPathnamePrefix
(
aFileName
,
SRCDIR
"/svx/source/tbxctrls/fillctrl.cxx"
))
return
true
;
return
true
;
// See the commit message of d0e7d020fa405ab94f19916ec96fbd4611da0031
// "socket.c -> socket.cxx" for the reason to have
//
// bool(FD_ISSET(...))
//
// in sal/osl/unx/socket.cxx:
auto
const
sub
=
compat
::
getSubExprAsWritten
(
expr
);
//TODO: Better check that sub is exactly an expansion of FD_ISSET:
if
(
sub
->
getLocEnd
().
isMacroID
())
{
for
(
auto
loc
=
sub
->
getLocStart
();
loc
.
isMacroID
()
&&
(
compiler
.
getSourceManager
()
.
isAtStartOfImmediateMacroExpansion
(
loc
));
loc
=
compiler
.
getSourceManager
().
getImmediateMacroCallerLoc
(
loc
))
{
if
(
Lexer
::
getImmediateMacroName
(
loc
,
compiler
.
getSourceManager
(),
compiler
.
getLangOpts
())
==
"FD_ISSET"
)
{
return
true
;
}
}
}
auto
const
t1
=
expr
->
getTypeAsWritten
();
auto
const
t1
=
expr
->
getTypeAsWritten
();
auto
const
t2
=
compat
::
getSubExprAsWritten
(
expr
)
->
getType
();
auto
const
t2
=
compat
::
getSubExprAsWritten
(
expr
)
->
getType
();
if
(
t1
!=
t2
)
if
(
t1
!=
t2
)
...
...
sal/osl/unx/socket.cxx
Dosyayı görüntüle @
f6dda4e1
...
@@ -2399,7 +2399,7 @@ sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket pSocket)
...
@@ -2399,7 +2399,7 @@ sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket pSocket)
return
false
;
return
false
;
}
}
return
FD_ISSET
(
pSocket
->
m_Socket
,
&
Set
->
m_Set
);
return
bool
(
FD_ISSET
(
pSocket
->
m_Socket
,
&
Set
->
m_Set
)
);
}
}
sal_Int32
SAL_CALL
osl_demultiplexSocketEvents
(
oslSocketSet
IncomingSet
,
sal_Int32
SAL_CALL
osl_demultiplexSocketEvents
(
oslSocketSet
IncomingSet
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment