summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--caputils/airpcap_loader.c2
-rw-r--r--epan/crypt/airpdcap_ccmp.c1
-rw-r--r--reordercap.c2
-rw-r--r--ui/language.c2
-rw-r--r--ui/win32/print_win32.c3
-rw-r--r--wiretap/eyesdn.c2
-rw-r--r--wiretap/ngsniffer.c2
-rw-r--r--wiretap/pcapng.c1
8 files changed, 4 insertions, 11 deletions
diff --git a/caputils/airpcap_loader.c b/caputils/airpcap_loader.c
index 299cac1483..7d2fbc7349 100644
--- a/caputils/airpcap_loader.c
+++ b/caputils/airpcap_loader.c
@@ -816,7 +816,6 @@ free_airpcap_interface_list(GList *if_list)
{
g_list_foreach(if_list, free_airpcap_if_cb, NULL);
g_list_free(if_list);
- if_list = NULL;
}
/*
@@ -1138,7 +1137,6 @@ airpcap_if_info_free(airpcap_if_info_t *if_info)
if (if_info != NULL)
{
g_free(if_info);
- if_info = NULL;
}
}
}
diff --git a/epan/crypt/airpdcap_ccmp.c b/epan/crypt/airpdcap_ccmp.c
index 46ad49625f..cedfe423e2 100644
--- a/epan/crypt/airpdcap_ccmp.c
+++ b/epan/crypt/airpdcap_ccmp.c
@@ -246,7 +246,6 @@ INT AirPDcapCcmpDecrypt(
while (space >= AES_BLOCK_LEN) {
CCMP_DECRYPT(i, b, b0, pos, a, AES_BLOCK_LEN);
pos += AES_BLOCK_LEN, space -= AES_BLOCK_LEN;
- data_len -= AES_BLOCK_LEN;
i++;
}
diff --git a/reordercap.c b/reordercap.c
index e680dba2bb..61c3d9c0c0 100644
--- a/reordercap.c
+++ b/reordercap.c
@@ -268,7 +268,7 @@ DIAG_ON(cast-qual)
}
exit(1);
}
- DEBUG_PRINT("file_type_subtype is %u\n", wtap_file_type_subtype(wth));
+ DEBUG_PRINT("file_type_subtype is %d\n", wtap_file_type_subtype(wth));
shb_hdr = wtap_file_get_shb_for_new_file(wth);
idb_inf = wtap_file_get_idb_info(wth);
diff --git a/ui/language.c b/ui/language.c
index 75a716298d..65a338011e 100644
--- a/ui/language.c
+++ b/ui/language.c
@@ -48,7 +48,7 @@ read_language_pref(gchar *key, const gchar *value,
if (strcmp(key, LANGUAGE_PREF_LANGUAGE) == 0) {
if (language)
g_free(language);
- if (!value || (value && !*value))
+ if (!value || !*value)
language = g_strdup("auto");
else
language = g_strdup(value);
diff --git a/ui/win32/print_win32.c b/ui/win32/print_win32.c
index d58bedcec3..cfa211cb8e 100644
--- a/ui/win32/print_win32.c
+++ b/ui/win32/print_win32.c
@@ -182,7 +182,6 @@ static void print_file(const char *file_name, HDC hdc, int width, int height)
#define Y_OFFSET 5
FILE* fh1;
- size_t results;
int cnt=0, y_pos = Y_OFFSET, y_cnt = 0;
char buf[MAX_BUF_SIZE];
char ch;
@@ -204,7 +203,7 @@ static void print_file(const char *file_name, HDC hdc, int width, int height)
return;
}
- while ((results = fread(&ch, 1, 1, fh1)) != 0) {
+ while (fread(&ch, 1, 1, fh1) != 0) {
/* end of page (form feed)? */
if (ch == 0x0c) {
/* send buffer */
diff --git a/wiretap/eyesdn.c b/wiretap/eyesdn.c
index 494e99f7e1..5ab651a3a4 100644
--- a/wiretap/eyesdn.c
+++ b/wiretap/eyesdn.c
@@ -92,7 +92,7 @@ static gboolean esc_read(FILE_T fh, guint8 *buf, int len, int *err, gchar **err_
/* Magic text to check for eyesdn-ness of file */
static const unsigned char eyesdn_hdr_magic[] =
{ 'E', 'y', 'e', 'S', 'D', 'N'};
-#define EYESDN_HDR_MAGIC_SIZE (sizeof(eyesdn_hdr_magic) / sizeof(eyesdn_hdr_magic[0]))
+#define EYESDN_HDR_MAGIC_SIZE sizeof(eyesdn_hdr_magic)
/* Size of a record header */
#define EYESDN_HDR_LENGTH 12
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index 79fd2971e2..b69ac087a8 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -2381,7 +2381,6 @@ ng_read_bytes_or_eof(wtap *wth, void *buffer, unsigned int nbytes, gboolean is_r
ngsniffer_t *ngsniffer;
FILE_T infile;
ngsniffer_comp_stream_t *comp_stream;
- gint64 copied_bytes = 0; /* bytes already copied */
unsigned char *outbuffer = (unsigned char *)buffer; /* where to write next decompressed data */
blob_info_t *blob;
unsigned int bytes_to_copy;
@@ -2477,7 +2476,6 @@ ng_read_bytes_or_eof(wtap *wth, void *buffer, unsigned int nbytes, gboolean is_r
memcpy(outbuffer, &comp_stream->buf[comp_stream->nextout],
bytes_to_copy);
nbytes -= bytes_to_copy;
- copied_bytes += bytes_to_copy;
outbuffer += bytes_to_copy;
comp_stream->nextout += bytes_to_copy;
comp_stream->uncomp_offset += bytes_to_copy;
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
index fbd51d3d07..146af3ba0a 100644
--- a/wiretap/pcapng.c
+++ b/wiretap/pcapng.c
@@ -1909,7 +1909,6 @@ read_options:
pcapng_debug("pcapng_read_name_resolution_block: opt_comment length %u seems strange", oh.option_length);
}
break;
- break;
default:
#ifdef HAVE_PLUGINS
/*