redraw_fixer: a couple of style fixes
[staging/windowmanager.git] / src / redraw_fixer.cpp
index c9b5112..94964af 100644 (file)
@@ -1,6 +1,18 @@
-//
-// Created by mfritzsc on 9/11/17.
-//
+/*
+ * Copyright (C) 2017 Mentor Graphics Development (Deutschland) GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 #include "wayland.hpp"
 
@@ -27,9 +39,9 @@ struct App {
    void try_fix(uint32_t surface_id);
 };
 
-void controller_hooks::surface_created(uint32_t surface_id) {}
+void controller_hooks::surface_created(uint32_t /*surface_id*/) {}
 
-void controller_hooks::surface_removed(uint32_t surface_id) {}
+void controller_hooks::surface_removed(uint32_t /*surface_id*/) {}
 
 void controller_hooks::surface_visibility(uint32_t surface_id, uint32_t v) {
    this->app->surface_visibility(surface_id, v);
@@ -66,9 +78,10 @@ App::App() : chooks{this}, display{new wl::display}, controller{}, outputs{} {
                this->outputs.back()->proxy.get())));
       });
 
-   for (int i : {1, 2, 3})
+   for (int i : {1, 2, 3}) {
       this->display->roundtrip();
 }
+}
 
 void App::commit() {
    this->controller->commit_changes();
@@ -102,13 +115,14 @@ void App::try_fix(uint32_t surface_id) {
 
 }  // namespace wm
 
-int main(int argc, char **argv) {
+int main(int /*argc*/, char ** /*argv*/) {
    wm::App app;
    if (!app.display->ok()) {
       fputs("Could not init wayland display\n", stderr);
       return 1;
    }
-   while (app.display->dispatch() != -1)
+   while (app.display->dispatch() != -1) {
       ;
+   }
    return 0;
 }