Fix more Windows compile errors - Silence warnings in sky code (unnecessary return) - Disable some warnings for bison-generated code - Missing include for htons et al. - Don't build xdisplaycheck on Windows. R=jam@chromium.org Review URL: https://codereview.chromium.org/697183003
diff --git a/win/win_util.cc b/win/win_util.cc index f46242d..3ae42e4 100644 --- a/win/win_util.cc +++ b/win/win_util.cc
@@ -119,14 +119,12 @@ static bool g_crash_on_process_detach = false; -void GetNonClientMetrics(NONCLIENTMETRICS_XP* metrics) { +void GetNonClientMetrics(NONCLIENTMETRICS* metrics) { DCHECK(metrics); metrics->cbSize = sizeof(*metrics); - const bool success = !!SystemParametersInfo( - SPI_GETNONCLIENTMETRICS, - metrics->cbSize, - reinterpret_cast<NONCLIENTMETRICS*>(metrics), - 0); + const bool success = + !!SystemParametersInfo( + SPI_GETNONCLIENTMETRICS, metrics->cbSize, metrics, 0); DCHECK(success); }
diff --git a/win/win_util.h b/win/win_util.h index 8513f62..9439597 100644 --- a/win/win_util.h +++ b/win/win_util.h
@@ -33,30 +33,10 @@ struct _tagpropertykey; typedef _tagpropertykey PROPERTYKEY; -// This is the same as NONCLIENTMETRICS except that the -// unused member |iPaddedBorderWidth| has been removed. -struct NONCLIENTMETRICS_XP { - UINT cbSize; - int iBorderWidth; - int iScrollWidth; - int iScrollHeight; - int iCaptionWidth; - int iCaptionHeight; - LOGFONTW lfCaptionFont; - int iSmCaptionWidth; - int iSmCaptionHeight; - LOGFONTW lfSmCaptionFont; - int iMenuWidth; - int iMenuHeight; - LOGFONTW lfMenuFont; - LOGFONTW lfStatusFont; - LOGFONTW lfMessageFont; -}; - namespace base { namespace win { -BASE_EXPORT void GetNonClientMetrics(NONCLIENTMETRICS_XP* metrics); +BASE_EXPORT void GetNonClientMetrics(NONCLIENTMETRICS* metrics); // Returns the string representing the current user sid. BASE_EXPORT bool GetUserSidString(std::wstring* user_sid);