Merge "Silence warnings about unused parameters."
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index 56287a0..519f2b0 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -257,7 +257,7 @@
/* forks a command and waits for it to finish */
int run_command(const char *title, int timeout_seconds, const char *command, ...) {
fflush(stdout);
- clock_t start = clock();
+ time_t start = time(NULL);
pid_t pid = fork();
/* handle error case */
@@ -295,19 +295,19 @@
for (;;) {
int status;
pid_t p = waitpid(pid, &status, WNOHANG);
- float elapsed = (float) (clock() - start) / CLOCKS_PER_SEC;
+ time_t elapsed = time(NULL) - start;
if (p == pid) {
if (WIFSIGNALED(status)) {
printf("*** %s: Killed by signal %d\n", command, WTERMSIG(status));
} else if (WIFEXITED(status) && WEXITSTATUS(status) > 0) {
printf("*** %s: Exit code %d\n", command, WEXITSTATUS(status));
}
- if (title) printf("[%s: %.1fs elapsed]\n\n", command, elapsed);
+ if (title) printf("[%s: %ds elapsed]\n\n", command, (int) elapsed);
return status;
}
if (timeout_seconds && elapsed > timeout_seconds) {
- printf("*** %s: Timed out after %.1fs (killing pid %d)\n", command, elapsed, pid);
+ printf("*** %s: Timed out after %ds (killing pid %d)\n", command, (int) elapsed, pid);
kill(pid, SIGTERM);
return -1;
}
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 5c3c99c..ffc44c7 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -35,7 +35,7 @@
class ComposerState;
class DisplayState;
-class DisplayInfo;
+struct DisplayInfo;
class IDisplayEventConnection;
class IMemoryHeap;
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index 01a9d2e..46292a4 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -37,7 +37,7 @@
namespace android {
-class DisplayInfo;
+struct DisplayInfo;
class DisplaySurface;
class IGraphicBufferProducer;
class Layer;
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index 9f96113..30df461 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -191,7 +191,7 @@
* This behaves more or less like a forward iterator.
*/
class LayerListIterator {
- friend struct HWComposer;
+ friend class HWComposer;
HWCLayer* const mLayerList;
size_t mIndex;