Fixed more compiler warnings
This commit is contained in:
+3
-7
@@ -159,10 +159,9 @@ void el_decode(char *message, char *key, char *result)
|
||||
|
||||
int fnmatch1(const char *pattern, const char *string)
|
||||
{
|
||||
const char *stringstart;
|
||||
char c, test;
|
||||
|
||||
for (stringstart = string;;)
|
||||
for (;;)
|
||||
switch (c = *pattern++) {
|
||||
case EOS:
|
||||
return (*string == EOS ? 0 : 1);
|
||||
@@ -276,7 +275,7 @@ INT ss_file_find(char *path, char *pattern, char **plist)
|
||||
|
||||
INT el_search_message(char *tag, int *fh, BOOL walk, BOOL first)
|
||||
{
|
||||
int lfh, i, n, d, min, max, size, offset, direction, last, status, did_walk;
|
||||
int lfh, i, n, d, min, max, size, offset, direction, status, did_walk;
|
||||
struct tm *tms, ltms;
|
||||
time_t lt, ltime, lact;
|
||||
char str[256], file_name[256], dir[256];
|
||||
@@ -485,8 +484,6 @@ INT el_search_message(char *tag, int *fh, BOOL walk, BOOL first)
|
||||
/* seek next message */
|
||||
|
||||
/* read current message size */
|
||||
last = TELL(lfh);
|
||||
|
||||
i = read(lfh, str, 15);
|
||||
if (i <= 0) {
|
||||
close(lfh);
|
||||
@@ -850,7 +847,7 @@ INT el_get_v1(char *tag, char *message, int *bufsize)
|
||||
|
||||
\********************************************************************/
|
||||
{
|
||||
int i, size, fh, offset, search_status;
|
||||
int i, size, fh, search_status;
|
||||
char str[256];
|
||||
|
||||
if (tag[0]) {
|
||||
@@ -866,7 +863,6 @@ INT el_get_v1(char *tag, char *message, int *bufsize)
|
||||
}
|
||||
|
||||
/* extract message size */
|
||||
offset = TELL(fh);
|
||||
i = read(fh, str, 16);
|
||||
if (i <= 0) {
|
||||
close(fh);
|
||||
|
||||
+3
-3
@@ -5163,7 +5163,7 @@ int el_delete_message(LOGBOOK * lbs, int message_id, BOOL delete_attachments,
|
||||
|
||||
\********************************************************************/
|
||||
{
|
||||
int i, index, n, size, fh, tail_size, old_offset;
|
||||
int i, index, size, fh, tail_size, old_offset;
|
||||
char str[MAX_PATH_LENGTH], file_name[MAX_PATH_LENGTH], reply_to[MAX_REPLY_TO * 10], in_reply_to[256];
|
||||
char *buffer, *p;
|
||||
char *message, attachment_all[64 * MAX_ATTACHMENTS];
|
||||
@@ -5268,12 +5268,12 @@ int el_delete_message(LOGBOOK * lbs, int message_id, BOOL delete_attachments,
|
||||
buffer = xmalloc(tail_size);
|
||||
|
||||
lseek(fh, lbs->el_index[index].offset + size, SEEK_SET);
|
||||
n = my_read(fh, buffer, tail_size);
|
||||
my_read(fh, buffer, tail_size);
|
||||
}
|
||||
lseek(fh, lbs->el_index[index].offset, SEEK_SET);
|
||||
|
||||
if (tail_size > 0) {
|
||||
n = write(fh, buffer, tail_size);
|
||||
write(fh, buffer, tail_size);
|
||||
xfree(buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user