Use Suffix Extensions in Makefiles (doc, src/{arm,dht,integration,statistics}) for...
[oweals/gnunet.git] / src / conversation / gnunet-helper-audio-record.c
index ee5d7873e6e8b86892bb34601dbd31e57f93ff96..82bb6d5b3add5f23898136aaee218376f04f736c 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2013 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -300,8 +300,8 @@ write_page (ogg_page *og)
   size_t msg_size;
   msg_size = sizeof (struct AudioMessage) + og->header_len + og->body_len;
   audio_message->header.size = htons ((uint16_t) msg_size);
-  memcpy (&audio_message[1], og->header, og->header_len);
-  memcpy (((char *) &audio_message[1]) + og->header_len, og->body, og->body_len);
+  GNUNET_memcpy (&audio_message[1], og->header, og->header_len);
+  GNUNET_memcpy (((char *) &audio_message[1]) + og->header_len, og->body, og->body_len);
 
   toff += msg_size;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -330,7 +330,7 @@ packetizer ()
 
   while (transmit_buffer_length >= transmit_buffer_index + pcm_length)
   {
-    memcpy (pcm_buffer,
+    GNUNET_memcpy (pcm_buffer,
            &transmit_buffer[transmit_buffer_index],
            pcm_length);
     transmit_buffer_index += pcm_length;
@@ -405,8 +405,8 @@ stream_read_callback (pa_stream * s,
   const void *data;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Got %u/%u bytes of PCM data\n",
-             length,
+             "Got %u/%d bytes of PCM data\n",
+             (unsigned int) length,
              pcm_length);
 
   GNUNET_assert (NULL != s);
@@ -428,7 +428,7 @@ stream_read_callback (pa_stream * s,
   {
     transmit_buffer = pa_xrealloc (transmit_buffer,
                                   transmit_buffer_length + length);
-    memcpy (&transmit_buffer[transmit_buffer_length],
+    GNUNET_memcpy (&transmit_buffer[transmit_buffer_length],
            data,
            length);
     transmit_buffer_length += length;
@@ -436,7 +436,7 @@ stream_read_callback (pa_stream * s,
   else
   {
     transmit_buffer = pa_xmalloc (length);
-    memcpy (transmit_buffer, data, length);
+    GNUNET_memcpy (transmit_buffer, data, length);
     transmit_buffer_length = length;
     transmit_buffer_index = 0;
   }
@@ -686,7 +686,7 @@ ogg_init ()
     const char *opusver;
     int vendor_length;
 
-    memcpy (headpacket.magic, "OpusHead", 8);
+    GNUNET_memcpy (headpacket.magic, "OpusHead", 8);
     headpacket.version = 1;
     headpacket.channels = CHANNELS;
     headpacket.preskip = GNUNET_htole16 (0);
@@ -718,14 +718,14 @@ ogg_init ()
     if (NULL == commentspacket)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                 _("Failed to allocate %d bytes for second packet\n"),
-                  commentspacket_len);
+                 _("Failed to allocate %u bytes for second packet\n"),
+                  (unsigned int) commentspacket_len);
       exit (5);
     }
 
-    memcpy (commentspacket->magic, "OpusTags", 8);
+    GNUNET_memcpy (commentspacket->magic, "OpusTags", 8);
     commentspacket->vendor_length = GNUNET_htole32 (vendor_length);
-    memcpy (&commentspacket[1], opusver, vendor_length);
+    GNUNET_memcpy (&commentspacket[1], opusver, vendor_length);
     *(uint32_t *) &((char *) &commentspacket[1])[vendor_length] = \
         GNUNET_htole32 (0); /* no tags */