remove some unused variables and remove some pedantic compiler warnings - frontends - front-ends for some sites (experiment)
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 1752940aca51413222b22939b7c6ce5947960967
(DIR) parent 6623393565f6397c68240f8b77b8f05b87ad9f18
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 19 Feb 2023 14:43:47 +0100
remove some unused variables and remove some pedantic compiler warnings
Diffstat:
M duckduckgo/gopher.c | 2 +-
M reddit/cli.c | 2 +-
M reddit/reddit.c | 4 +---
3 files changed, 3 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/duckduckgo/gopher.c b/duckduckgo/gopher.c
@@ -23,7 +23,7 @@ main(void)
{
struct duckduckgo_results *results;
struct duckduckgo_result *result;
- char buf[512], *p, *search = NULL;
+ char *p, *search = NULL;
size_t i;
setlocale(LC_CTYPE, "");
(DIR) diff --git a/reddit/cli.c b/reddit/cli.c
@@ -43,7 +43,7 @@ printitem(struct item *item)
printf("num_comments: %ld\n", item->num_comments);
struct tm *tm = gmtime(&(item->created_utc));
- printf("created_utc: %lld\n", item->created_utc);
+ printf("created_utc: %lld\n", (long long)item->created_utc);
printf("created_utc: %s", asctime(tm));
if (item->is_video) {
(DIR) diff --git a/reddit/reddit.c b/reddit/reddit.c
@@ -212,8 +212,7 @@ reddit_list(const char *subreddit, int limit,
const char *before, const char *after)
{
struct list_response *r;
- const char *errstr;
- char *data, *s;
+ char *data;
if (!(data = reddit_list_data(subreddit, limit, before, after))) {
fprintf(stderr, "%s\n", __func__);
@@ -239,7 +238,6 @@ reddit_isvalidlink(const char *s)
{
char *end = NULL;
unsigned long long l;
- size_t i, len;
/* type prefix: reddit link is "t3_" */
if (strncmp(s, "t3_", 3))