am 7aa8cdfb: am 21157abc: am 8814bd1d: Merge "include: cleanup for -Wsystem-header"
* commit '7aa8cdfb317dcb7efb7127b070526df09da05377': include: cleanup for -Wsystem-header
This commit is contained in:
commit
881c89c54a
|
@ -59,7 +59,7 @@ static inline void bitmask_init(unsigned int *bitmask, int num_bits)
|
|||
static inline int bitmask_ffz(unsigned int *bitmask, int num_bits)
|
||||
{
|
||||
int bit, result;
|
||||
unsigned int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < BITS_TO_WORDS(num_bits); i++) {
|
||||
bit = ffs(~bitmask[i]);
|
||||
|
@ -77,7 +77,7 @@ static inline int bitmask_ffz(unsigned int *bitmask, int num_bits)
|
|||
|
||||
static inline int bitmask_weight(unsigned int *bitmask, int num_bits)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int weight = 0;
|
||||
|
||||
for (i = 0; i < BITS_TO_WORDS(num_bits); i++)
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#define __CUTILS_FS_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* TEMP_FAILURE_RETRY is defined by some, but not all, versions of
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -67,7 +67,8 @@ public:
|
|||
// timespec
|
||||
bool operator== (const timespec &T) const
|
||||
{
|
||||
return (tv_sec == T.tv_sec) && (tv_nsec == T.tv_nsec);
|
||||
return (tv_sec == static_cast<uint32_t>(T.tv_sec))
|
||||
&& (tv_nsec == static_cast<uint32_t>(T.tv_nsec));
|
||||
}
|
||||
bool operator!= (const timespec &T) const
|
||||
{
|
||||
|
@ -75,8 +76,9 @@ public:
|
|||
}
|
||||
bool operator< (const timespec &T) const
|
||||
{
|
||||
return (tv_sec < T.tv_sec)
|
||||
|| ((tv_sec == T.tv_sec) && (tv_nsec < T.tv_nsec));
|
||||
return (tv_sec < static_cast<uint32_t>(T.tv_sec))
|
||||
|| ((tv_sec == static_cast<uint32_t>(T.tv_sec))
|
||||
&& (tv_nsec < static_cast<uint32_t>(T.tv_nsec)));
|
||||
}
|
||||
bool operator>= (const timespec &T) const
|
||||
{
|
||||
|
@ -84,8 +86,9 @@ public:
|
|||
}
|
||||
bool operator> (const timespec &T) const
|
||||
{
|
||||
return (tv_sec > T.tv_sec)
|
||||
|| ((tv_sec == T.tv_sec) && (tv_nsec > T.tv_nsec));
|
||||
return (tv_sec > static_cast<uint32_t>(T.tv_sec))
|
||||
|| ((tv_sec == static_cast<uint32_t>(T.tv_sec))
|
||||
&& (tv_nsec > static_cast<uint32_t>(T.tv_nsec)));
|
||||
}
|
||||
bool operator<= (const timespec &T) const
|
||||
{
|
||||
|
|
|
@ -62,9 +62,8 @@ struct logger_entry_v3 {
|
|||
|
||||
/*
|
||||
* The maximum size of the log entry payload that can be
|
||||
* written to the kernel logger driver. An attempt to write
|
||||
* more than this amount to /dev/log/* will result in a
|
||||
* truncated log entry.
|
||||
* written to the logger. An attempt to write more than
|
||||
* this amount will result in a truncated log entry.
|
||||
*/
|
||||
#define LOGGER_ENTRY_MAX_PAYLOAD 4076
|
||||
|
||||
|
|
|
@ -527,6 +527,14 @@ typedef struct {
|
|||
static const audio_offload_info_t AUDIO_INFO_INITIALIZER = {
|
||||
version: AUDIO_OFFLOAD_INFO_VERSION_CURRENT,
|
||||
size: sizeof(audio_offload_info_t),
|
||||
sample_rate: 0,
|
||||
channel_mask: 0,
|
||||
format: AUDIO_FORMAT_DEFAULT,
|
||||
stream_type: AUDIO_STREAM_VOICE_CALL,
|
||||
bit_rate: 0,
|
||||
duration_us: 0,
|
||||
has_video: false,
|
||||
is_streaming: false
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include <system/graphics.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef __unused
|
||||
#define __unused __attribute__((__unused__))
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -89,10 +93,10 @@ typedef struct ANativeWindowBuffer
|
|||
|
||||
// Implement the methods that sp<ANativeWindowBuffer> expects so that it
|
||||
// can be used to automatically refcount ANativeWindowBuffer's.
|
||||
void incStrong(const void* id) const {
|
||||
void incStrong(const void* /*id*/) const {
|
||||
common.incRef(const_cast<android_native_base_t*>(&common));
|
||||
}
|
||||
void decStrong(const void* id) const {
|
||||
void decStrong(const void* /*id*/) const {
|
||||
common.decRef(const_cast<android_native_base_t*>(&common));
|
||||
}
|
||||
#endif
|
||||
|
@ -352,10 +356,10 @@ struct ANativeWindow
|
|||
|
||||
/* Implement the methods that sp<ANativeWindow> expects so that it
|
||||
can be used to automatically refcount ANativeWindow's. */
|
||||
void incStrong(const void* id) const {
|
||||
void incStrong(const void* /*id*/) const {
|
||||
common.incRef(const_cast<android_native_base_t*>(&common));
|
||||
}
|
||||
void decStrong(const void* id) const {
|
||||
void decStrong(const void* /*id*/) const {
|
||||
common.decRef(const_cast<android_native_base_t*>(&common));
|
||||
}
|
||||
#endif
|
||||
|
@ -603,13 +607,13 @@ static inline int native_window_set_usage(
|
|||
|
||||
/* deprecated. Always returns 0. Don't call. */
|
||||
static inline int native_window_connect(
|
||||
struct ANativeWindow* window, int api) {
|
||||
struct ANativeWindow* window __unused, int api __unused) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* deprecated. Always returns 0. Don't call. */
|
||||
static inline int native_window_disconnect(
|
||||
struct ANativeWindow* window, int api) {
|
||||
struct ANativeWindow* window __unused, int api __unused) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class Functor {
|
|||
public:
|
||||
Functor() {}
|
||||
virtual ~Functor() {}
|
||||
virtual status_t operator ()(int what, void* data) { return NO_ERROR; }
|
||||
virtual status_t operator ()(int /*what*/, void* /*data*/) { return NO_ERROR; }
|
||||
};
|
||||
|
||||
}; // namespace android
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
|
||||
bool next() {
|
||||
mIndex = mCache.mTable->next(mIndex);
|
||||
return mIndex != -1;
|
||||
return (ssize_t)mIndex != -1;
|
||||
}
|
||||
|
||||
size_t index() const {
|
||||
|
@ -104,9 +104,13 @@ private:
|
|||
|
||||
// Implementation is here, because it's fully templated
|
||||
template <typename TKey, typename TValue>
|
||||
LruCache<TKey, TValue>::LruCache(uint32_t maxCapacity): mMaxCapacity(maxCapacity),
|
||||
mNullValue(NULL), mTable(new BasicHashtable<TKey, Entry>), mYoungest(NULL), mOldest(NULL),
|
||||
mListener(NULL) {
|
||||
LruCache<TKey, TValue>::LruCache(uint32_t maxCapacity)
|
||||
: mTable(new BasicHashtable<TKey, Entry>)
|
||||
, mListener(NULL)
|
||||
, mOldest(NULL)
|
||||
, mYoungest(NULL)
|
||||
, mMaxCapacity(maxCapacity)
|
||||
, mNullValue(NULL) {
|
||||
};
|
||||
|
||||
template<typename K, typename V>
|
||||
|
|
Loading…
Reference in New Issue