Bläddra i källkod

Minor compilation fixes

Paul-Louis Ageneau 4 år sedan
förälder
incheckning
7188bc9d8d
4 ändrade filer med 8 tillägg och 8 borttagningar
  1. 4 4
      examples/client/getopt.cpp
  2. 2 3
      examples/client/main.cpp
  3. 1 0
      examples/client/parse_cl.cpp
  4. 1 1
      examples/media/main.cpp

+ 4 - 4
examples/client/getopt.cpp

@@ -84,7 +84,7 @@ static void exchange_a(char **argv, struct _getopt_data_a *d)
 		if (top - middle > middle - bottom)
 		{
 			int len = middle - bottom;
-			register int i;
+			int i;
 			for (i = 0; i < len; i++)
 			{
 				tem = argv[bottom + i];
@@ -96,7 +96,7 @@ static void exchange_a(char **argv, struct _getopt_data_a *d)
 		else
 		{
 			int len = top - middle;
-			register int i;
+			int i;
 			for (i = 0; i < len; i++)
 			{
 				tem = argv[bottom + i];
@@ -544,7 +544,7 @@ static void exchange_w(wchar_t **argv, struct _getopt_data_w *d)
 		if (top - middle > middle - bottom)
 		{
 			int len = middle - bottom;
-			register int i;
+			int i;
 			for (i = 0; i < len; i++)
 			{
 				tem = argv[bottom + i];
@@ -556,7 +556,7 @@ static void exchange_w(wchar_t **argv, struct _getopt_data_w *d)
 		else
 		{
 			int len = top - middle;
-			register int i;
+			int i;
 			for (i = 0; i < len; i++)
 			{
 				tem = argv[bottom + i];

+ 2 - 3
examples/client/main.cpp

@@ -49,8 +49,7 @@ bool echoDataChannelMessages = false;
 
 shared_ptr<PeerConnection> createPeerConnection(const Configuration &config,
                                                 weak_ptr<WebSocket> wws, string id);
-
-void confirmOnStdout(bool echoed, string id, string type, int length);
+void confirmOnStdout(bool echoed, string id, string type, size_t length);
 string randomId(size_t length);
 
 int main(int argc, char **argv) {
@@ -255,7 +254,7 @@ shared_ptr<PeerConnection> createPeerConnection(const Configuration &config,
 	return pc;
 };
 
-void confirmOnStdout(bool echoed, string id, string type, int length) {
+void confirmOnStdout(bool echoed, string id, string type, size_t length) {
 	static long count = 0;
 	static long freq = 100;
 	if (!(++count%freq)) {

+ 1 - 0
examples/client/parse_cl.cpp

@@ -20,6 +20,7 @@
 #include <stdlib.h>
 
 #if defined(_WIN32) || defined(WIN32)
+#define STATIC_GETOPT
 #include "getopt.h"
 #else
 #include <getopt.h>

+ 1 - 1
examples/media/main.cpp

@@ -73,7 +73,7 @@ int main() {
 		track->onMessage(
 		    [session, sock, addr](rtc::binary message) {
 			    // This is an RTP packet
-			    sendto(sock, reinterpret_cast<const char *>(message.data()), message.size(), 0,
+			    sendto(sock, reinterpret_cast<const char *>(message.data()), int(message.size()), 0,
 			           reinterpret_cast<const struct sockaddr *>(&addr), sizeof(addr));
 		    },
 		    nullptr);