Skip to content

Commit

Permalink
Logd: Handle unused variable and fields
Browse files Browse the repository at this point in the history
For build-system CFLAGS clean-up.

Bug: 18632512
Change-Id: If81d6705b44e9a29f64c44c56ea633c031e831b7
  • Loading branch information
agampe authored and Steve Kondik committed Nov 1, 2015
1 parent 58be58c commit 67c96c8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
6 changes: 2 additions & 4 deletions logd/CommandListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@

CommandListener::CommandListener(LogBuffer *buf, LogReader * /*reader*/,
LogListener * /*swl*/) :
FrameworkListener(getLogSocket()),
mBuf(*buf) {
FrameworkListener(getLogSocket()) {
// registerCmd(new ShutdownCmd(buf, writer, swl));
registerCmd(new ClearCmd(buf));
registerCmd(new GetBufSizeCmd(buf));
Expand All @@ -47,10 +46,9 @@ CommandListener::CommandListener(LogBuffer *buf, LogReader * /*reader*/,
registerCmd(new ReinitCmd());
}

CommandListener::ShutdownCmd::ShutdownCmd(LogBuffer *buf, LogReader *reader,
CommandListener::ShutdownCmd::ShutdownCmd(LogReader *reader,
LogListener *swl) :
LogCommand("shutdown"),
mBuf(*buf),
mReader(*reader),
mSwl(*swl) {
}
Expand Down
4 changes: 1 addition & 3 deletions logd/CommandListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
void reinit_signal_handler(int /*signal*/);

class CommandListener : public FrameworkListener {
LogBuffer &mBuf;

public:
CommandListener(LogBuffer *buf, LogReader *reader, LogListener *swl);
Expand All @@ -37,12 +36,11 @@ class CommandListener : public FrameworkListener {
static int getLogSocket();

class ShutdownCmd : public LogCommand {
LogBuffer &mBuf;
LogReader &mReader;
LogListener &mSwl;

public:
ShutdownCmd(LogBuffer *buf, LogReader *reader, LogListener *swl);
ShutdownCmd(LogReader *reader, LogListener *swl);
virtual ~ShutdownCmd() {}
int runCommand(SocketClient *c, int argc, char ** argv);
};
Expand Down
3 changes: 0 additions & 3 deletions logd/LogKlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ LogKlog::LogKlog(LogBuffer *buf, LogReader *reader, int fdWrite, int fdRead, boo
logbuf(buf),
reader(reader),
signature(CLOCK_MONOTONIC),
fdWrite(fdWrite),
fdRead(fdRead),
initialized(false),
enableLogging(true),
auditd(auditd) {
Expand Down Expand Up @@ -492,7 +490,6 @@ int LogKlog::log(const char *buf) {
}
}
} else if (isspace(cp[size])) {
const char *b = cp;
cp += size;
while (isspace(*++cp));
// <PRI>[<TIME>] <tag> <tag> : message
Expand Down
2 changes: 0 additions & 2 deletions logd/LogKlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class LogKlog : public SocketListener {
LogBuffer *logbuf;
LogReader *reader;
const log_time signature;
const int fdWrite; // /dev/kmsg
const int fdRead; // /proc/kmsg
// Set once thread is started, separates KLOG_ACTION_READ_ALL
// and KLOG_ACTION_READ phases.
bool initialized;
Expand Down

0 comments on commit 67c96c8

Please sign in to comment.