Imported Upstream version 1.2.0
[platform/upstream/iotivity.git] / resource / examples / threadingsample.cpp
index b43d418..46cfbec 100644 (file)
@@ -23,6 +23,7 @@
 /// server in a separate thread, and running 2 clients in each thread.
 ///
 
+#include "iotivity_config.h"
 
 #include <memory>
 #include <iostream>
 
 #include "OCPlatform.h"
 #include "OCApi.h"
+
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
 using namespace OC;
 
 static std::ostringstream requestURI;
@@ -156,8 +162,8 @@ struct FooResource
     }
 };
 
-void putResourceInfo(const HeaderOptions& headerOptions,
-        const OCRepresentation rep, const OCRepresentation rep2, const int eCode)
+void putResourceInfo(const HeaderOptions& /*headerOptions*/,
+        const OCRepresentation rep, const OCRepresentation /*rep2*/, const int eCode)
 {
    bool m_isFoo = false;
    int m_barCount = 0;
@@ -186,7 +192,7 @@ void putResourceInfo(const HeaderOptions& headerOptions,
    }
 }
 
-void getResourceInfo(std::shared_ptr<OCResource> resource, const HeaderOptions& headerOptions,
+void getResourceInfo(std::shared_ptr<OCResource> resource, const HeaderOptions& /*headerOptions*/,
             const OCRepresentation rep,
             const int eCode)
 {
@@ -327,7 +333,7 @@ void server()
     cv.wait(lock);
 }
 
-int main(int argc, char* argv[])
+int main(int /*argc*/, char** /*argv[]*/)
 {
 
     requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.foo";