changeset 105:4703d622e95b

cleanup fedora9 compile warnings
author Carl Byington <carl@five-ten-sg.com>
date Sat, 11 Oct 2008 12:22:20 -0700
parents 39ba19372732
children 07d090676ce9
files src/libpst.c src/pst2ldif.cpp
diffstat 2 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/libpst.c	Thu Oct 09 12:04:40 2008 -0700
+++ b/src/libpst.c	Sat Oct 11 12:22:20 2008 -0700
@@ -925,7 +925,6 @@
 int pst_build_desc_ptr (pst_file *pf, off_t offset, int32_t depth, uint64_t linku1, uint64_t start_val, uint64_t end_val) {
     struct pst_table_ptr_structn table, table2;
     pst_descn desc_rec;
-    pst_desc_ll *d_ptr=NULL, *parent=NULL;
     int32_t item_count;
     uint64_t old = start_val;
     int x;
@@ -985,12 +984,14 @@
                 }
             }
             DEBUG_INDEX(("New Record %#"PRIx64" with parent %#x\n", desc_rec.d_id, desc_rec.parent_id));
-            d_ptr             = (pst_desc_ll*) xmalloc(sizeof(pst_desc_ll));
-            d_ptr->id         = desc_rec.d_id;
-            d_ptr->parent_id  = desc_rec.parent_id;
-            d_ptr->list_index = pst_getID(pf, desc_rec.list_id);
-            d_ptr->desc       = pst_getID(pf, desc_rec.desc_id);
-            record_descriptor(pf, d_ptr);   // add to the global tree
+            {
+                pst_desc_ll *d_ptr = (pst_desc_ll*) xmalloc(sizeof(pst_desc_ll));
+                d_ptr->id          = desc_rec.d_id;
+                d_ptr->parent_id   = desc_rec.parent_id;
+                d_ptr->list_index  = pst_getID(pf, desc_rec.list_id);
+                d_ptr->desc        = pst_getID(pf, desc_rec.desc_id);
+                record_descriptor(pf, d_ptr);   // add to the global tree
+            }
         }
     } else {
         // this node contains node pointers
--- a/src/pst2ldif.cpp	Thu Oct 09 12:04:40 2008 -0700
+++ b/src/pst2ldif.cpp	Sat Oct 11 12:22:20 2008 -0700
@@ -298,7 +298,7 @@
                         if (item->comment)
                             print_ldif_single("description", item->comment);
 
-                        for (int i=0; i<ldap_class.size(); i++)
+                        for (size_type i=0; i<ldap_class.size(); i++)
                             print_ldif_single("objectClass", ldap_class[i].c_str());
                         printf("\n");
                     }
@@ -497,7 +497,7 @@
 void build_cn(char *cn, size_t len, int nvalues, char *value, ...)
 {
     bool space_flag = false;
-    int i = 0;
+    size_t i = 0;
     va_list ap;
 
     va_start(ap, value);
@@ -640,7 +640,7 @@
             printf("objectClass: organization\n\n");
             printf("dn: cn=root, %s\n", ldap_base);
             printf("cn: root\n");
-            for (int i=0; i<ldap_class.size(); i++)
+            for (size_type i=0; i<ldap_class.size(); i++)
                 print_ldif_single("objectClass", ldap_class[i].c_str());
             printf("\n");
         }