Tabs, makefile modification and no warnings
This commit is contained in:
parent
3e27f25236
commit
018f0d64e4
3 changed files with 32 additions and 40 deletions
|
@ -3,7 +3,7 @@
|
|||
TARGET = clainsafecli
|
||||
OBJS = clainsafecli.o
|
||||
CC = cc
|
||||
CFLAGS = -MD -Wall -Wextra -O2 -march=native -lcurl
|
||||
CFLAGS = -MD -std=c11 -Wall -Wextra -O2 -march=native -lcurl
|
||||
|
||||
$(TARGET): clainsafecli.o
|
||||
$(CC) $(CFLAGS) $(OBJS) -o $(TARGET)
|
||||
|
|
|
@ -144,13 +144,6 @@ main(int argc, char **argv)
|
|||
CURLFORM_COPYCONTENTS,argv[optind],
|
||||
CURLFORM_END);
|
||||
|
||||
/* Progress bar
|
||||
*
|
||||
* TODO: Use a custom progress bar rather than
|
||||
* default curl progress bar
|
||||
*
|
||||
*/
|
||||
|
||||
curl_easy_setopt(easy_handle,CURLOPT_NOPROGRESS,silent_flag);
|
||||
curl_easy_setopt(easy_handle,CURLOPT_PROGRESSFUNCTION,progress);
|
||||
|
||||
|
@ -174,7 +167,7 @@ main(int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static size_t
|
||||
size_t
|
||||
write_data(void *buffer, size_t size, size_t nmemb,
|
||||
void *userp)
|
||||
{
|
||||
|
@ -223,12 +216,11 @@ progress(void *clientp,
|
|||
double ultotal,
|
||||
double ulnow)
|
||||
{
|
||||
clientp = NULL;
|
||||
dltotal = 0;
|
||||
dlnow = 0;
|
||||
/* So I don't get a warning */
|
||||
clientp++;
|
||||
dltotal += 1;
|
||||
dlnow += 1;
|
||||
printf("\r%0.f uploaded of %0.f (%0.f%%)",ulnow,ultotal,
|
||||
ulnow*100/ultotal);
|
||||
fflush(stdout);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
size_t
|
||||
static write_data(void *buffer, size_t size, size_t nmemb,
|
||||
write_data(void *buffer, size_t size, size_t nmemb,
|
||||
void *userp);
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue