Remove unused variables; patch by Christian Hesse
authorColin Leroy <colin@colino.net>
Thu, 19 Jun 2014 05:53:24 +0000 (07:53 +0200)
committerColin Leroy <colin@colino.net>
Thu, 19 Jun 2014 05:53:24 +0000 (07:53 +0200)
src/plugins/tnef_parse/ytnef.c
src/plugins/vcalendar/libical/libical/icalrecur.c
src/plugins/vcalendar/libical/libical/icalrestriction.c.in
src/plugins/vcalendar/libical/libical/icalvalue.c
src/plugins/vcalendar/libical/libical/sspm.c

index 4babbb5..a2e7ed3 100644 (file)
@@ -317,14 +317,10 @@ int TNEFIcon STD_ARGLIST {
 
 // -----------------------------------------------------------------------------
 int TNEFRecipTable STD_ARGLIST {
-    DWORD count;
     BYTE *d;
-    int current_row;
-    int propcount;
-    int current_prop;
 
     d = data;
-    count = SwapDWord(d);
+    SwapDWord(d);
     d += 4;
 //    printf("Recipient Table containing %u rows\n", count);
 
index 159b448..9c07e79 100644 (file)
@@ -1272,10 +1272,12 @@ int next_hour(struct icalrecur_iterator_impl* impl)
 int next_day(struct icalrecur_iterator_impl* impl)
 {
 
-  short has_by_data = (impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX);
   short this_frequency = (impl->rule.freq == ICAL_DAILY_RECURRENCE);
+#ifndef NDEBUG
+  short has_by_data = (impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX);
 
   assert(has_by_data || this_frequency);
+#endif /* NDEBUG */
 
   if (next_hour(impl) == 0){
       return 0;
@@ -1434,9 +1436,11 @@ int next_month(struct icalrecur_iterator_impl* impl)
 {
     int data_valid = 1;
     
+#ifndef NDEBUG
     short this_frequency = (impl->rule.freq == ICAL_MONTHLY_RECURRENCE);
     
     assert( has_by_data(impl,BY_MONTH) || this_frequency);
+#endif /* NDEBUG */
   
     /* Iterate through the occurrences within a day. If we don't get to
        the end of the intra-day data, don't bother going to the next
@@ -1582,7 +1586,6 @@ int next_week(struct icalrecur_iterator_impl* impl)
   if( has_by_data){
     /* Use the Week Number byrule data */
       int week_no;
-      struct icaltimetype t;
       
       impl->by_indices[BY_WEEK_NO]++;
       
@@ -1593,10 +1596,6 @@ int next_week(struct icalrecur_iterator_impl* impl)
          end_of_data = 1;
       }
       
-      t = impl->last;
-      t.month=1; /* HACK, should be setting to the date of the first week of year*/
-      t.day=1;
-      
       week_no = impl->by_ptrs[BY_WEEK_NO][impl->by_indices[BY_WEEK_NO]];
       
       impl->last.day += week_no*7;
@@ -1624,7 +1623,7 @@ pvl_list expand_by_day(struct icalrecur_iterator_impl* impl,short year)
     int i;
     pvl_list days_list = pvl_newlist();
 
-    short start_dow, end_dow, end_year_day, start_doy;
+    short start_dow, end_year_day, start_doy;
     struct icaltimetype tmp = impl->last;
     
     tmp.year= year;
@@ -1641,7 +1640,6 @@ pvl_list expand_by_day(struct icalrecur_iterator_impl* impl,short year)
     tmp.day--;
     tmp = icaltime_normalize(tmp);
     
-    end_dow =  icaltime_day_of_week(tmp);
     end_year_day = icaltime_day_of_year(tmp);
     
     for(i = 0; BYDAYPTR[i] != ICAL_RECURRENCE_ARRAY_MAX; i++){
@@ -1769,17 +1767,6 @@ int expand_year_days(struct icalrecur_iterator_impl* impl,short year)
     case 1<<BY_WEEK_NO: {
         /* FREQ=YEARLY; BYWEEKNO=20,50 */
 
-       struct icaltimetype t;
-       short dow;
-
-       t.day = impl->dtstart.day;
-       t.month = impl->dtstart.month;
-       t.year = year;
-       t.is_date = 1;
-
-        dow = icaltime_day_of_week(t);
-       /* HACK Not finished */ 
-       
         break;
     }
 
index 4544425..e027a83 100644 (file)
@@ -271,7 +271,6 @@ int icalrestriction_check_component(icalproperty_method method,
     icalcomponent_kind comp_kind;
     icalrestriction_kind restr;
     icalrestriction_property_record *prop_record;
-    icalrestriction_component_record *comp_record;
     char* funcr = 0;
     icalproperty *prop;
 
index c245095..9306514 100644 (file)
@@ -539,12 +539,9 @@ icalvalue_is_valid (icalvalue* value)
 
 char* icalvalue_binary_as_ical_string(icalvalue* value) {
 
-    const char* data;
     char* str;
     icalerror_check_arg_rz( (value!=0),"value");
 
-    data = icalvalue_get_binary(value);
-
     str = (char*)icalmemory_tmp_buffer(60);
     sprintf(str,"icalvalue_binary_as_ical_string is not implemented yet");
 
index 7606521..731a5d5 100644 (file)
@@ -1012,7 +1012,6 @@ int sspm_parse_mime(struct sspm_part *parts,
 {
     struct mime_impl impl;
     struct sspm_header header;
-    void *part;
     int i;
 
     /* Initialize all of the data */
@@ -1037,13 +1036,7 @@ int sspm_parse_mime(struct sspm_part *parts,
     sspm_read_header(&impl,&header);
 
     if(header.major == SSPM_MULTIPART_MAJOR_TYPE){
-       struct sspm_header *child_header;
-       child_header = &(impl.parts[impl.part_no].header);
-       
        sspm_store_part(&impl,header,impl.level,0,0);
-
-       part = sspm_make_multipart_part(&impl,child_header);
-
     } else {
        void *part;
        size_t size;