summaryrefslogtreecommitdiffstats
path: root/liblog/logprint.c
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-04-30 08:50:53 -0700
committerMark Salyzyn <salyzyn@google.com>2014-05-07 16:56:21 -0700
commita04464adaf5b95ae953f8577632d3cf8aa2c80a3 (patch)
treec4310ee12b17d98841e3e7cdd819618f8a95c080 /liblog/logprint.c
parentd150618d8d31ca1b56258902c40ad5c38f1c4e31 (diff)
downloadcore-a04464adaf5b95ae953f8577632d3cf8aa2c80a3.tar.gz
core-a04464adaf5b95ae953f8577632d3cf8aa2c80a3.tar.bz2
core-a04464adaf5b95ae953f8577632d3cf8aa2c80a3.zip
liblog: set -Werror
- Deal with some -Wunused issues - Cleanup UNUSED to __unused transition Change-Id: Icd33808d4c974625f4fd0a126a90a2b4c90c8314
Diffstat (limited to 'liblog/logprint.c')
-rw-r--r--liblog/logprint.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/liblog/logprint.c b/liblog/logprint.c
index 3bc9f5a67..08e830acc 100644
--- a/liblog/logprint.c
+++ b/liblog/logprint.c
@@ -17,14 +17,14 @@
#define _GNU_SOURCE /* for asprintf */
+#include <arpa/inet.h>
+#include <assert.h>
#include <ctype.h>
-#include <stdio.h>
#include <errno.h>
-#include <stdlib.h>
#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <assert.h>
-#include <arpa/inet.h>
#include <log/logd.h>
#include <log/logprint.h>
@@ -52,15 +52,7 @@ static FilterInfo * filterinfo_new(const char * tag, android_LogPriority pri)
return p_ret;
}
-static void filterinfo_free(FilterInfo *p_info)
-{
- if (p_info == NULL) {
- return;
- }
-
- free(p_info->mTag);
- p_info->mTag = NULL;
-}
+/* balance to above, filterinfo_free left unimplemented */
/*
* Note: also accepts 0-9 priorities
@@ -139,23 +131,6 @@ static android_LogPriority filterPriForTag(
return p_format->global_pri;
}
-/** for debugging */
-static void dumpFilters(AndroidLogFormat *p_format)
-{
- FilterInfo *p_fi;
-
- for (p_fi = p_format->filters ; p_fi != NULL ; p_fi = p_fi->p_next) {
- char cPri = filterPriToChar(p_fi->mPri);
- if (p_fi->mPri == ANDROID_LOG_DEFAULT) {
- cPri = filterPriToChar(p_format->global_pri);
- }
- fprintf(stderr,"%s:%c\n", p_fi->mTag, cPri);
- }
-
- fprintf(stderr,"*:%c\n", filterPriToChar(p_format->global_pri));
-
-}
-
/**
* returns 1 if this log line should be printed based on its priority
* and tag, and 0 if it should not
@@ -234,7 +209,6 @@ AndroidLogPrintFormat android_log_formatFromString(const char * formatString)
int android_log_addFilterRule(AndroidLogFormat *p_format,
const char *filterExpression)
{
- size_t i=0;
size_t tagNameLength;
android_LogPriority pri = ANDROID_LOG_DEFAULT;
@@ -718,7 +692,6 @@ char *android_log_formatLogLine (
#endif
struct tm* ptm;
char timeBuf[32];
- char headerBuf[128];
char prefixBuf[128], suffixBuf[128];
char priChar;
int prefixSuffixIsHeaderFooter = 0;
@@ -817,7 +790,6 @@ char *android_log_formatLogLine (
/* the following code is tragically unreadable */
size_t numLines;
- size_t i;
char *p;
size_t bufferSize;
const char *pm;