Commit 4706a933 authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Fixed some more simple compile warnings in the examples.

parent b85b56a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
}
}


/* read callback function, fread() look alike */
/* read callback function, fread() look alike */
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
{
  size_t retcode;
  size_t retcode;


+2 −1
Original line number Original line Diff line number Diff line
@@ -10,6 +10,7 @@


#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <errno.h>
#include <time.h>
#include <time.h>


@@ -74,7 +75,7 @@ main(void)
#define snprintf _snprintf
#define snprintf _snprintf
#endif
#endif
    /* Netscape format cookie */
    /* Netscape format cookie */
    snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%u\t%s\t%s",
    snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s",
      ".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
      ".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
    res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
    res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
    if (res != CURLE_OK) {
    if (res != CURLE_OK) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@ struct FtpFile {
  FILE *stream;
  FILE *stream;
};
};


int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
static int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
{
{
  struct FtpFile *out=(struct FtpFile *)stream;
  struct FtpFile *out=(struct FtpFile *)stream;
  if(out && !out->stream) {
  if(out && !out->stream) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -21,7 +21,7 @@
 * This functionality was introduced in libcurl 7.9.3.
 * This functionality was introduced in libcurl 7.9.3.
 */
 */


size_t
static size_t
write_response(void *ptr, size_t size, size_t nmemb, void *data)
write_response(void *ptr, size_t size, size_t nmemb, void *data)
{
{
  FILE *writehere = (FILE *)data;
  FILE *writehere = (FILE *)data;
+1 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <fcntl.h>
#include <unistd.h>


/*
/*
 * This example shows an FTP upload, with a rename of the file just after
 * This example shows an FTP upload, with a rename of the file just after
Loading