diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./config/Makefile.in ./config/Makefile.in
--- ./config/Makefile.in	2005-12-10 20:44:28.000000000 +0100
+++ ./config/Makefile.in	2005-12-13 13:49:47.000000000 +0100
@@ -19,7 +19,7 @@
 
 ##################################################################
 
-DEVFLAGS= #-warn-error Am 
+DEVFLAGS= -warn-error Am 
 # -dtypes
 
 NO_LIBS_byte=
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/config/unix/mlUnix.ml ./src/config/unix/mlUnix.ml
--- ./src/config/unix/mlUnix.ml	2005-12-02 13:08:26.000000000 +0100
+++ ./src/config/unix/mlUnix.ml	2005-12-13 13:49:47.000000000 +0100
@@ -36,7 +36,6 @@
                   Unix.close in_read;
                   Unix.close out_write;
                   Unix.execvp cmd args;
-                  exit 127
                 with e -> 
                     Printf.eprintf "Exception %s in exec_command\n"
                       (Printexc2.to_string e) ; 
@@ -85,7 +84,6 @@
 			Unix.execv cmd args;
 		    | Some env ->
 			Unix.execve cmd args env;
-                  exit 0
                 with e -> 
                     lprintf "Exception %s while starting file_completed_cmd\n" (Printexc2.to_string e); 
                     exit 127
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/chat/chat_proto.ml ./src/daemon/chat/chat_proto.ml
--- ./src/daemon/chat/chat_proto.ml	2003-04-23 00:33:39.000000000 +0200
+++ ./src/daemon/chat/chat_proto.ml	2005-12-13 13:49:47.000000000 +0100
@@ -109,7 +109,6 @@
       | "MESSAGE" ->
 	  let length = int_of_string (il getline) in
 	  let s = String.create length in
-	  let n = input s 0 length in
 	  Message s
       |	"ROOM_MESSAGE" ->
 	  let name = getline () in
@@ -130,7 +129,6 @@
 	  let people = iter [] 0 in
 	  let length = int_of_string (il getline) in
 	  let s = String.create length in
-	  let n = input s 0 length in
 	  RoomMessage (name, people, s)
 
       | "ADD_OPEN" ->
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonClient.ml ./src/daemon/common/commonClient.ml
--- ./src/daemon/common/commonClient.ml	2005-11-19 17:11:37.000000000 +0100
+++ ./src/daemon/common/commonClient.ml	2005-12-13 13:49:47.000000000 +0100
@@ -407,7 +407,6 @@
 
 let client_print_html c o =
   let impl = as_client_impl c in
-  let i = client_info c in
   let n = impl.impl_client_ops.op_client_network in
   let info = client_info c in
   let buf = o.conn_buf in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonFile.ml ./src/daemon/common/commonFile.ml
--- ./src/daemon/common/commonFile.ml	2005-12-06 20:34:04.000000000 +0100
+++ ./src/daemon/common/commonFile.ml	2005-12-13 13:49:47.000000000 +0100
@@ -446,7 +446,6 @@
 module G = GuiTypes
 
 let file_downloaders file o cnt =
-  let buf = o.conn_buf in
 
       let srcs = file_active_sources file in
       let counter = ref cnt in
@@ -632,7 +631,6 @@
             file_print_sources_html file buf
           else begin
             Printf.bprintf buf "%d sources:\n" (List.length srcs);
-          let counter = ref 0 in
           let print_source c =
                   Printf.bprintf buf "  [%4d] " (client_num c);
                   client_bprint c buf;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonGlobals.ml ./src/daemon/common/commonGlobals.ml
--- ./src/daemon/common/commonGlobals.ml	2005-12-06 20:34:04.000000000 +0100
+++ ./src/daemon/common/commonGlobals.ml	2005-12-13 14:02:18.000000000 +0100
@@ -475,7 +475,7 @@
       (Printexc2.to_string e) !messages_log;
 
   while (Fifo.length chat_message_fifo) > !!html_mods_max_messages do
-    let foo = Fifo.take chat_message_fifo in ()
+    ignore(Fifo.take chat_message_fifo)
   done
 let last_message_log = ref 0
 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonGraphics.gd.ml ./src/daemon/common/commonGraphics.gd.ml
--- ./src/daemon/common/commonGraphics.gd.ml	2005-10-11 18:56:33.000000000 +0200
+++ ./src/daemon/common/commonGraphics.gd.ml	2005-12-13 13:58:11.000000000 +0100
@@ -242,7 +242,6 @@
   let my_x = (xbr()) in
   let my_x2 = (xbs()) in
   let my_y = (ybb()) in
-  let datas g n = List.nth (List.rev (Fifo.to_list g)) n in
   let fx x = int_of_float((float_of_int my_x) -. (((float_of_int x) /. (x_fdivisions())) *. (float_of_int my_x2))) in
   (* and vtext n = (string_of_int (int_of_float((float_of_int(n))*. vx ))) in *)
   let basetime = Unix.gettimeofday () in
@@ -265,7 +264,6 @@
   let my_x = (xbr()) in
   let my_x2 = (xbs()) in
   let my_y = (ybb()) in
-  let my_y2 = (ybs()) in
   let datas g n = List.nth (List.rev (Fifo.to_list g)) n in
   let fx x = int_of_float((float_of_int my_x) -. (((float_of_int x) /. (fxgdivisions())) *. (float_of_int my_x2)))
   and y_c1 n = (my_y - (int_of_float(float_of_int(datas g n) *. (vdt_m g))))
@@ -300,7 +298,6 @@
   let my_x = (xbr()) in
   let my_x2 = (xbs()) in
   let my_y = (ybb() - (ybs() / 2)) in
-  let my_y2 = (ybs() / 2) in
   let datas g n = List.nth (List.rev (Fifo.to_list g)) n in
   let fx x = int_of_float((float_of_int my_x) -. (((float_of_int x) /. (fxgdivisions())) *. (float_of_int my_x2)))
   and y_c1 n = (my_y - (int_of_float(float_of_int(datas g n) *. (vdt_stack g))))
@@ -335,7 +332,6 @@
   let my_x = (xbr()) in
   let my_x2 = (xbs()) in
   let my_y = (ybb() - (ybs() / 2)) in
-  let my_y2 = (ybs() / 2) in
   let datas g n = List.nth (List.rev (Fifo.to_list g)) n in
   let fx x = int_of_float((float_of_int my_x) -. (((float_of_int x) /. (fxgdivisions())) *. (float_of_int my_x2)))
   and y_c1 n = (my_y + (int_of_float(float_of_int(datas g n) *. (vdt_stack g))))
@@ -368,10 +364,8 @@
 
 
 let draw_mean_line mypic g my_color gcolor =
-  let my_x = (xbr())
-  and my_x2 = (xbs())
-  and my_y = (ybb())
-  and my_y2 = (ybs()) in
+  let my_x2 = (xbs())
+  and my_y = (ybb()) in
   let my_sum gl = List.fold_left (+) 0 (Fifo.to_list gl) in
   let meanx() = ((float_of_int (my_sum g)) /. (float_of_int ((Fifo.length g)))) in
   let ypos = (my_y - (int_of_float((meanx()) *. (vdt_m g)))) in
@@ -385,13 +379,10 @@
 (
   let g_y = win_y() in
   (* set colors *)
-  let white = mypic#colors#white in
   let black = mypic#colors#black in
   let red = mypic#colors#red in
   let green = mypic#colors#resolve ~red:0 ~blue:0 ~green:255 in
   let darkgrey = mypic#colors#resolve ~red:128 ~blue:128 ~green:128 in
-  let darkgreen = mypic#colors#resolve ~red:0 ~blue:0 ~green:128 in
-  let darkred = mypic#colors#resolve ~red:128 ~blue:0 ~green:0 in
 
   (* draw graph *)
   draw_borders mypic black;
@@ -446,7 +437,6 @@
 let do_draw_pic ttl vl hl gdown gup =
   (* init pic *)
 (
-  let g_x = win_x() in
   let g_y = win_y() in
   let mypic = Gd.create ~x:(win_x()) ~y:g_y in
 
@@ -508,10 +498,8 @@
   (* set colors *)
   let white = mypic#colors#white in
   let black = mypic#colors#black in
-  let red = mypic#colors#red in
   let green = mypic#colors#resolve ~red:0 ~blue:0 ~green:255 in
   let darkgrey = mypic#colors#resolve ~red:128 ~blue:128 ~green:128 in
-  let darkgreen = mypic#colors#resolve ~red:0 ~blue:0 ~green:128 in
   let darkred = mypic#colors#resolve ~red:128 ~blue:0 ~green:0 in
 
   if !!html_mods_vd_gfx_transparent then
@@ -547,9 +535,7 @@
   let white = mypic#colors#white in
   let black = mypic#colors#black in
   let red = mypic#colors#red in
-  let green = mypic#colors#resolve ~red:0 ~blue:0 ~green:255 in
   let darkgrey = mypic#colors#resolve ~red:128 ~blue:128 ~green:128 in
-  let darkgreen = mypic#colors#resolve ~red:0 ~blue:0 ~green:128 in
   let darkred = mypic#colors#resolve ~red:128 ~blue:0 ~green:0 in
 
   if !!html_mods_vd_gfx_transparent then
@@ -577,7 +563,6 @@
 let do_draw_h_pic ttl vl hl gdown gup =
   (* init pic *)
 (
-  let g_x = win_x() in
   let g_y = win_y() in
   let mypic = Gd.create ~x:(win_x()) ~y:g_y in
 
@@ -626,10 +611,8 @@
   (* set colors *)
   let white = mypic#colors#white in
   let black = mypic#colors#black in
-  let red = mypic#colors#red in
   let green = mypic#colors#resolve ~red:0 ~blue:0 ~green:255 in
   let darkgrey = mypic#colors#resolve ~red:128 ~blue:128 ~green:128 in
-  let darkgreen = mypic#colors#resolve ~red:0 ~blue:0 ~green:128 in
   let darkred = mypic#colors#resolve ~red:128 ~blue:0 ~green:0 in
 
   if !!html_mods_vd_gfx_transparent then
@@ -665,9 +648,7 @@
   let white = mypic#colors#white in
   let black = mypic#colors#black in
   let red = mypic#colors#red in
-  let green = mypic#colors#resolve ~red:0 ~blue:0 ~green:255 in
   let darkgrey = mypic#colors#resolve ~red:128 ~blue:128 ~green:128 in
-  let darkgreen = mypic#colors#resolve ~red:0 ~blue:0 ~green:128 in
   let darkred = mypic#colors#resolve ~red:128 ~blue:0 ~green:0 in
 
   if !!html_mods_vd_gfx_transparent then
@@ -707,13 +688,7 @@
   Gd.create ~x:g_x ~y:g_y in
 
   (* set colors *)
-  let white = mypic#colors#white in
   let black = mypic#colors#black in
-  let red = mypic#colors#red in
-  let green = mypic#colors#resolve ~red:0 ~blue:0 ~green:255 in
-  let darkgrey = mypic#colors#resolve ~red:128 ~blue:128 ~green:128 in
-  let darkgreen = mypic#colors#resolve ~red:0 ~blue:0 ~green:128 in
-  let darkred = mypic#colors#resolve ~red:128 ~blue:0 ~green:0 in
   (* draw graph *)
   draw_tag mypic title gdown gup black ;
   (if !!html_mods_vd_gfx_tag_png then
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonInteractive.ml ./src/daemon/common/commonInteractive.ml
--- ./src/daemon/common/commonInteractive.ml	2005-12-10 00:23:40.000000000 +0100
+++ ./src/daemon/common/commonInteractive.ml	2005-12-13 13:49:47.000000000 +0100
@@ -82,7 +82,6 @@
     Buffer.contents buf
 
 let file_commited_name incoming_dir file =
-  let network = file_network file in
   let best_name = file_best_name file in
   (try Unix2.safe_mkdir incoming_dir with _ -> ());
   let new_name =
@@ -300,7 +299,6 @@
         done_files =:= file :: !!done_files;
         update_file_state impl FileDownloaded;
         let file_name = file_disk_name file in
-        let file_id = Filename.basename file_name in
         ignore (CommonShared.new_shared "completed" 0 (
             file_best_name file ) file_name);
         (try mail_for_completed_file file with e ->
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonMultimedia.ml ./src/daemon/common/commonMultimedia.ml
--- ./src/daemon/common/commonMultimedia.ml	2005-11-19 18:19:45.000000000 +0100
+++ ./src/daemon/common/commonMultimedia.ml	2005-12-13 13:49:47.000000000 +0100
@@ -269,7 +269,6 @@
 let rec next_ogg_stream ic ogg_infos str stream_number =
   let pos = pos_in ic in
   page_seek ic str pos;
-  let header_start_pos = (pos_in ic - 4) in
   let pos = pos_in ic in
 (*
   let serial_number = String.create 4 in
@@ -303,12 +302,7 @@
   let s = String.create sizeof_packet in
   really_input ic s 0 sizeof_packet;
   let codec = String.lowercase (String.sub s 0 4) in
-  let size = read32 (String.sub s 4 4) in
   let time_unit = read64 (String.sub s 8 8) in
-  let sample_per_unit = read64 (String.sub s 16 8) in
-  let default_len = read32 (String.sub s 24 4) in
-  let buffer_size = read32 (String.sub s 28 4) in
-  let bits_per_sample = read16 (String.sub s 32 2) in
   let video_width =
     if sizeof_packet >= sizeof_old_ogm_packet
       then read32 (String.sub s 36 4)
@@ -335,12 +329,7 @@
   let s = String.create sizeof_packet in
   really_input ic s 0 sizeof_packet;
   let codec = get_audio_codec (String.sub s 0 4) in
-  let size = read32 (String.sub s 4 4) in
-  let time_unit = read64 (String.sub s 8 8) in
   let sample_per_unit = read64 (String.sub s 16 8) in
-  let default_len = read32 (String.sub s 24 4) in
-  let buffer_size = read32 (String.sub s 28 4) in
-  let bits_per_sample = read16 (String.sub s 32 2) in
   let channels =
     if sizeof_packet >= sizeof_old_ogm_packet
       then read16 (String.sub s 36 2)
@@ -407,13 +396,9 @@
   let vrev = int_of_char s.[2] in
   let codec = Printf.sprintf "theora-%d.%d.%d" vmaj vmin vrev in
   (* multiply by 16 to get the actual frame width in pixels *)
-  let fmbw = read16B (String.sub s 3 2) lsl 4 in
   (* multiply by 16 to get the actual frame height in pixels *)
-  let fmbh = read16B (String.sub s 5 2) lsl 4 in
   let picw = read24B (String.sub s 7 3)  in
   let pich = read24B (String.sub s 10 3) in
-  let picx = int_of_char s.[13] in
-  let picy = int_of_char s.[14] in
   let frn = read32B (String.sub s 15 4) in
   let frd = read32B (String.sub s 19 4) in
   let sample_rate = frn /. frd in
@@ -535,34 +520,7 @@
                 
                 ignore (input_string4 ic);
                 
-                
-                let dwMicroSecPerFrame = input_int32 ic in
-                let dwMaxBytesPerSec = input_int32 ic in
-                let dwPaddingGranularity = input_int32 ic in
-                let dwFlags = input_int32 ic in
-                let dwTotalFrames = input_int32 ic in
-                let dwInitialFrames = input_int32 ic in
-                let dwStreams = input_int32 ic in
-                let dwSuggestedBufferSize = input_int32 ic in              
-                let dwWidth = input_int32 ic in
-                let dwHeight = input_int32 ic in
-
-(*
-              print_int32 "dwMicroSecPerFrame" dwMicroSecPerFrame ;
-              print_int32 "dwMaxBytesPerSec" dwMaxBytesPerSec ;
-              print_int32 "dwPaddingGranularity" dwPaddingGranularity ;
-              print_int32 "dwFlags" dwFlags ;
-              print_int32 "dwTotalFrames" dwTotalFrames ;
-              print_int32 "dwInitialFrames" dwInitialFrames ;
-              print_int32 "dwStreams" dwStreams ;
-              print_int32 "dwSuggestedBufferSize" dwSuggestedBufferSize ;
-              print_int32 "dwWidth" dwWidth;
-              print_int32 "dwHeight" dwHeight;
-              *)
-                
                 seek_in ic ((Int64.to_int pos) + main_header_len + 20);
-                let s = input_string4 ic in
-(*              lprint_string4 "LIST:" s; *)
                 let pos_in = 
                   pos ++ Int64.of_int (main_header_len + 24) in
                 let last_pos = pos_in ++ size2 in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonOptions.ml ./src/daemon/common/commonOptions.ml
--- ./src/daemon/common/commonOptions.ml	2005-12-03 17:20:26.000000000 +0100
+++ ./src/daemon/common/commonOptions.ml	2005-12-13 13:49:47.000000000 +0100
@@ -1536,7 +1536,6 @@
 the kill function of a GUI or CTRL+C.\n\n"
 
 let _ =
-  let in_hook = ref false in
   option_hook global_login (fun _ ->
       let len = String.length !!global_login in
       let prefix = "mldonkey_" in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonSources.ml ./src/daemon/common/commonSources.ml
--- ./src/daemon/common/commonSources.ml	2005-10-25 11:42:35.000000000 +0200
+++ ./src/daemon/common/commonSources.ml	2005-12-13 13:49:47.000000000 +0100
@@ -524,7 +524,6 @@
 
         let nsources_per_queue = Array.create nqueues 0 in
         let nready_per_queue = Array.create nqueues 0 in
-        let nready_throttled_per_queue = Array.create nqueues 0 in
         let nindirect_per_queue = Array.create nqueues 0 in
         let ninvalid_per_queue = Array.create nqueues 0 in
         let nall = ref 0 in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonSwarming2.ml ./src/daemon/common/commonSwarming2.ml
--- ./src/daemon/common/commonSwarming2.ml	2005-11-12 12:20:20.000000000 +0100
+++ ./src/daemon/common/commonSwarming2.ml	2005-12-13 13:49:47.000000000 +0100
@@ -1061,7 +1061,6 @@
 (*************************************************************************)
 
 let verify t chunks num begin_pos end_pos =
-  let file = t.t_file in
   file_verify t.t_file chunks.(num) begin_pos end_pos
 
 (*************************************************************************)
@@ -1179,9 +1178,6 @@
                                   EmptyBlock -> set_bitmap_0 s i
                                 | PartialBlock _ ->  set_bitmap_1 s i
                                 | CompleteBlock ->
-                                    let block_begin = t.t_block_size *.. i in
-                                    let block_end = block_begin ++ t.t_block_size in
-                                    let block_end = min block_end s.s_size in
                                     let block_begin = compute_block_begin s i in
                                     let block_end = compute_block_end s i in
                                     add_file_downloaded None s (block_begin -- block_end);
@@ -1835,7 +1831,6 @@
       and iter_partial up =
         let n = up.up_npartial in
         if n = 0 then raise Not_found;
-        let t = up.up_t in
         let b, block_begin, block_end = up.up_partial_blocks.(n-1) in
         let t = up.up_t in
         let s = t.t_s in
@@ -2143,7 +2138,7 @@
               up.up_block <- None;
         );
 
-        let (b,block_begin,block_end) as result = select_block up in
+        let (b,block_begin,block_end) (* as result *) = select_block up in
         let num = b.block_num in
         s.s_nuploading.(num) <- s.s_nuploading.(num) + 1;
         up.up_block <- Some b;
@@ -2747,7 +2742,7 @@
   are correctly associed. *)
     with Not_found -> ());
 
-  let set_bitmap =
+  let _ =
     let mtime = try file_mtime t.t_file with _ -> 0. in
     let old_mtime =
       try
@@ -3146,8 +3141,6 @@
 
           incr counter
       ) swarmers_by_name;
-      let block_storage = 64 * !nblocks in
-
       Printf.bprintf buf "  Swarmers: %d\n" !counter;
       Printf.bprintf buf "    nchunks: %d nblocks: %d nranges: %d\n"
         !nchunks !nblocks !nranges;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonUploads.ml ./src/daemon/common/commonUploads.ml
--- ./src/daemon/common/commonUploads.ml	2005-11-19 17:11:37.000000000 +0100
+++ ./src/daemon/common/commonUploads.ml	2005-12-13 13:49:47.000000000 +0100
@@ -241,11 +241,9 @@
 let shareds_by_id = Hashtbl.create 13
 
 let add_by_uid uid sh =
-  let urn = Uid.to_string uid in
   Hashtbl.add shareds_by_uid uid sh
 
 let find_by_uid uid =
-  let urn = Uid.to_string uid in
   Hashtbl.find shareds_by_uid uid
 
 module SharedFilesIndex = IndexedSharedFiles.MakeIndex (struct
@@ -522,7 +520,6 @@
     | ED2K ->
         let size = info.shared_size in
         let chunk_size = ed2k_block_size  in
-        let nhashes = Int64.to_int (size // chunk_size) + 1 in
         let rec iter pos hashes =
           if pos < size then
             try
@@ -543,7 +540,6 @@
           let list = List.rev hashes in
           let ed2k = md4_of_list list in
           let uid = Uid.create (Ed2k (ed2k)) in
-          let urn = Uid.to_string uid in
           info.shared_md4s <- Array.of_list list;
           info.shared_uids <- uid :: info.shared_uids;
           IndexedSharedFiles.update_result sh.shared_info info;
@@ -559,7 +555,6 @@
 
           let size = info.shared_size in
           let chunk_size = tiger_block_size in
-          let nhashes = Int64.to_int (size // chunk_size) + 1 in
           let rec iter pos hashes =
             if pos < size then
                 CommonHasher.compute_tiger info.shared_fullname
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/commonWeb.ml ./src/daemon/common/commonWeb.ml
--- ./src/daemon/common/commonWeb.ml	2005-11-21 01:13:15.000000000 +0100
+++ ./src/daemon/common/commonWeb.ml	2005-12-13 13:49:47.000000000 +0100
@@ -220,7 +220,6 @@
                   | _ -> ())
             in
             TcpBufferedSocket.set_rtimeout sock 30.;
-            let to_read = ref [] in
             set_reader sock (cut_messages (fun opcode s ->
                   if !verbose_redirector then lprintf_nl "[cWeb] redirector info received";
                   let module L = LittleEndian in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/giftDecoding.ml ./src/daemon/common/giftDecoding.ml
--- ./src/daemon/common/giftDecoding.ml	2003-11-20 17:43:14.000000000 +0100
+++ ./src/daemon/common/giftDecoding.ml	2005-12-13 13:49:47.000000000 +0100
@@ -86,10 +86,7 @@
         }
     | "addsource", _ ->
         let save = find_key "save" args in
-        let url = find_key "url" args in
-        let size = find_key "size" args in
         let hash = find_key "hash" args in
-        let user = find_key "user" args in
         Download_query ([save], int_of_string hash, false)
         
     | "transfer", Some num ->
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/guiDecoding.ml ./src/daemon/common/guiDecoding.ml
--- ./src/daemon/common/guiDecoding.ml	2005-12-06 20:34:04.000000000 +0100
+++ ./src/daemon/common/guiDecoding.ml	2005-12-13 13:49:47.000000000 +0100
@@ -392,7 +392,6 @@
 
 let get_result proto s pos =
   let num  = get_int s pos in
-  let net = get_int s (pos+4) in
   let names, pos = get_list get_string s (pos+8) in
   let uids, pos = 
     if proto < 27 then
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/common/guiEncoding.ml ./src/daemon/common/guiEncoding.ml
--- ./src/daemon/common/guiEncoding.ml	2005-11-28 15:32:28.000000000 +0100
+++ ./src/daemon/common/guiEncoding.ml	2005-12-13 13:49:47.000000000 +0100
@@ -960,7 +960,6 @@
         buf_opcode buf 57; buf_search buf_string proto buf s
     
     | Version s ->
-        let proto = proto.(58) in
         buf_opcode buf 58; buf_string buf s
     
     | GiftServerAttach _ -> assert false
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/driver/driverCommands.ml ./src/daemon/driver/driverCommands.ml
--- ./src/daemon/driver/driverCommands.ml	2005-12-06 20:34:04.000000000 +0100
+++ ./src/daemon/driver/driverCommands.ml	2005-12-13 14:02:59.000000000 +0100
@@ -347,7 +347,6 @@
         ), ":\t\t\t\t\t$bsave and kill the server$n";
 
     "add_url", Arg_two (fun kind url o ->
-        let buf = o.conn_buf in
         let v = (kind, 1, url) in
         if not (List.mem v !!web_infos) then
           web_infos =:=  v :: !!web_infos;
@@ -512,7 +511,7 @@
 (* rely on GC? *)
 
         while (Fifo.length chat_message_fifo) > !!html_mods_max_messages  do
-          let foo = Fifo.take chat_message_fifo in ()
+          ignore (Fifo.take chat_message_fifo)
         done;
 
         if use_html_mods o then Printf.bprintf buf "\\<div class=\\\"messages\\\"\\>";
@@ -862,7 +861,6 @@
     ), "<server numbers> :\t\t\tremove server (use arg 'all' for all servers)";
 
     "server_banner", Arg_one (fun num o ->
-        let buf = o.conn_buf in
         let num = int_of_string num in
         let s = server_find num in
         (match server_state s with
@@ -1074,7 +1072,6 @@
     [
 
     "nu", Arg_one (fun num o ->
-        let buf = o.conn_buf in
         let num = int_of_string num in
 
         if num > 0 then (* we want to disable upload for a short time *)
@@ -1217,14 +1214,12 @@
     ) , " :\t\t\t\tprint all networks";
 
     "enable", Arg_one (fun num o ->
-        let buf = o.conn_buf in
         let n = network_find_by_num (int_of_string num) in
         network_enable n;
         _s "network enabled"
     ) , " <num> :\t\t\t\tenable a particular network";
 
     "disable", Arg_one (fun num o ->
-        let buf = o.conn_buf in
         let n = network_find_by_num (int_of_string num) in
         network_disable n;
         _s "network disabled"
@@ -1243,7 +1238,6 @@
     [
 
     "forget", Arg_multiple (fun args o ->
-        let buf = o.conn_buf in
         let user = o.conn_user in
         begin
           match args with
@@ -1401,7 +1395,6 @@
     ), "<num> :\t\t\t\t$bfile to download$n";
 
     "force_download", Arg_none (fun o ->
-        let buf = o.conn_buf in
 	if !forceable_download = [] then
 	  begin
             let output = (if o.conn_output = HTML then begin
@@ -1457,7 +1450,6 @@
     "set", Arg_two (fun name value o ->
         try
           try
-            let buf = o.conn_buf in
             CommonInteractive.set_fully_qualified_options name value;
             Printf.sprintf "option %s value changed" name
 
@@ -1487,7 +1479,6 @@
     ), "<option_name> <option_value> :\t$bchange option value$n";
 
     "save", Arg_multiple (fun args o ->
-        let buf = o.conn_buf in
         match args with
 	  ["options"] -> DriverInteractive.save_config (); _s "options saved"
 	| ["sources"] -> CommonComplexOptions.save_sources (); _s "sources saved"
@@ -2819,7 +2810,6 @@
         ), "<link> :\t\t\t\tdownload ed2k, sig2dat, torrent or other link";
 
     "dllinks", Arg_one (fun arg o ->
-        let buf = o.conn_buf in
 
         let file = File.to_string arg in
         let lines = String2.split_simplify file '\n' in
@@ -2874,7 +2864,6 @@
     ), ":\t\t\t\t\tdump current log state to console";
 
     "ansi", Arg_one (fun arg o ->
-        let buf = o.conn_buf in
         let b = bool_of_string arg in
         if b then begin
             o.conn_output <- ANSI;
@@ -2892,7 +2881,6 @@
     "<width> <height> :\t\t\tset terminal width and height (devel)";
 
     "stdout", Arg_one (fun arg o ->
-        let buf = o.conn_buf in
         let b = bool_of_string arg in
         set_logging b;
 	if b then
@@ -2984,8 +2972,6 @@
      ), ":\t\t\t\tclear log_file";
 
     "html_mods", Arg_none (fun o ->
-        let buf = o.conn_buf in
-
         if !!html_mods then
           begin
             html_mods =:= false;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/driver/driverControlers.ml ./src/daemon/driver/driverControlers.ml
--- ./src/daemon/driver/driverControlers.ml	2005-11-21 20:29:39.000000000 +0100
+++ ./src/daemon/driver/driverControlers.ml	2005-12-13 13:49:47.000000000 +0100
@@ -447,8 +447,6 @@
 
 let user_reader o telnet sock nread =
   let b = TcpBufferedSocket.buf sock in
-  let end_pos = b.pos + b.len in
-  let new_pos = end_pos - nread in
   let rec iter () =
     if b.len > 0 then
       let c = b.buf.[b.pos] in
@@ -839,7 +837,7 @@
         let file = open_in theme_page in
         let size = (Unix.stat theme_page).Unix.st_size in
         let s = String.make size ' ' in
-        let ok = really_input file s 0 size in
+        let _ = really_input file s 0 size in
         close_in file; s
 
 let add_simple_commands buf =
@@ -1530,6 +1528,6 @@
       default = http_handler http_options;
     } in
   option_hook allowed_ips (fun _ -> config.addrs <- !!allowed_ips);
-  let sock = find_port "http server" !!http_bind_addr http_port
+  let _ = find_port "http server" !!http_bind_addr http_port
       (Http_server.handler config) in
   config.port <- !!http_port
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/driver/driverInterface.ml ./src/daemon/driver/driverInterface.ml
--- ./src/daemon/driver/driverInterface.ml	2005-11-28 15:31:40.000000000 +0100
+++ ./src/daemon/driver/driverInterface.ml	2005-12-13 13:49:47.000000000 +0100
@@ -384,7 +384,6 @@
 let gui_initialize gui = 
 
   gui.gui_initialized <- true;
-  let connecting = ref true in
   networks_iter_all (fun n ->
       gui_send gui (Network_info (network_info n)));
   gui_send gui (Console (DriverControlers.text_of_html !!motd_html));
@@ -502,7 +501,7 @@
           List.iter (fun file ->
               
               List.iter (fun s ->
-                  let section = section_name s in
+                  let _ = section_name s in
                   List.iter (fun o ->
                       gui_send gui (
                         P.Add_plugin_option (r.network_name, o)
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/driver/driverLink.ml ./src/daemon/driver/driverLink.ml
--- ./src/daemon/driver/driverLink.ml	2005-05-28 13:19:42.000000000 +0200
+++ ./src/daemon/driver/driverLink.ml	2005-12-13 13:49:47.000000000 +0100
@@ -316,7 +316,6 @@
                     List.iter (fun file ->
                         let best_name = file_best_name file in
                         let disk_name = file_disk_name file in
-                        let ext = Filename2.last_extension best_name in
                         lprintf "Adding %s\n" best_name;
                         let file_size = Int64.to_float (file_size file) in
                         let file_downloaded = 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/daemon/driver/driverMain.ml ./src/daemon/driver/driverMain.ml
--- ./src/daemon/driver/driverMain.ml	2005-12-02 13:08:26.000000000 +0100
+++ ./src/daemon/driver/driverMain.ml	2005-12-13 14:04:19.000000000 +0100
@@ -264,8 +264,7 @@
       Options.load users_ini;
     with e ->
         lprintf_nl "Exception %s during options load" (Printexc2.to_string e);
-        exit 70;
-        ());
+        exit 70);
 
   (* Here, we try to update options when a new version of mldonkey is
      used. For example, we can add new web_infos... *)
@@ -316,8 +315,8 @@
           exit 0), _s " : print version number and exit";
       "-exit", Arg.Unit (fun _ -> exit 0), ": exit immediatly";
       "-format", Arg.String (fun file ->
-          let format = CommonMultimedia.get_info file in
-          ()), _s  " <filename> : check file format";
+          ignore (CommonMultimedia.get_info file)),
+          _s  " <filename> : check file format";
       "-test_ip", Arg.String (fun ip ->
           lprintf_nl "%s = %s" ip (Ip.to_string (Ip.of_string ip));
           exit 0), _s "<ip> : undocumented";
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/im/imProtocol.ml ./src/im/imProtocol.ml
--- ./src/im/imProtocol.ml	2005-10-10 18:22:25.000000000 +0200
+++ ./src/im/imProtocol.ml	2005-12-13 14:10:19.000000000 +0100
@@ -96,9 +96,9 @@
       impl_protocol_val = v;
       impl_protocol_num = !counter;
       op_protocol_account_from_option = (fun s -> 
-        failwith "op_protocol_account_from_option not implemented for %s" name);
+        failwith (Printf.sprintf "op_protocol_account_from_option not implemented for %s" name));
       op_protocol_new_account = (fun s -> 
-        failwith "op_protocol_new_account not implemented for %s" name);
+        failwith (Printf.sprintf "op_protocol_new_account not implemented for %s" name));
       op_protocol_available_status = (fun s -> 
           [Online_available])
     }  in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/bittorrent/bTClients.ml ./src/networks/bittorrent/bTClients.ml
--- ./src/networks/bittorrent/bTClients.ml	2005-11-28 15:30:42.000000000 +0100
+++ ./src/networks/bittorrent/bTClients.ml	2005-12-13 13:49:47.000000000 +0100
@@ -261,7 +261,6 @@
         try
 (*          List.iter (fun r -> Int64Swarmer.free_range r) c.client_ranges; *)
           set_client_disconnected c reason;
-          let file = c.client_file in
           (try if c.client_good then count_seen c with _ -> ());
           (* this is not useful already done in the match
           (try close sock reason with _ -> ());   *)
@@ -572,7 +571,6 @@
   if c.client_new_chunks <> [] then begin
     let chunks = c.client_new_chunks in
     c.client_new_chunks <- [];
-    let file = c.client_file in
     List.iter (fun n -> Bitv.set bitmap n true) chunks;
     Int64Swarmer.update_uploader up (AvailableBitv bitmap);
   end
@@ -1407,7 +1405,7 @@
                                     (Ip.to_string !peer_ip) !port br.blocking_description;
                                 false)
                         then
-                          let c = new_client file !peer_id (!peer_ip,!port)
+                          let _ = new_client file !peer_id (!peer_ip,!port)
                           in
                           if !verbose_sources > 1 then lprintf_nl () "Received %s:%d" (Ip.to_string !peer_ip)
                           !port;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/bittorrent/bTComplexOptions.ml ./src/networks/bittorrent/bTComplexOptions.ml
--- ./src/networks/bittorrent/bTComplexOptions.ml	2005-11-07 21:11:42.000000000 +0100
+++ ./src/networks/bittorrent/bTComplexOptions.ml	2005-12-13 13:49:47.000000000 +0100
@@ -229,7 +229,6 @@
 
 let file_to_value file =
   try
-    let sources = Hashtbl2.to_list file.file_clients in
     let assocs =
       [
         "file_temp", string_to_value (Unix32.filename (file_fd file));
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/bittorrent/bTInteractive.ml ./src/networks/bittorrent/bTInteractive.ml
--- ./src/networks/bittorrent/bTInteractive.ml	2005-12-06 20:34:05.000000000 +0100
+++ ./src/networks/bittorrent/bTInteractive.ml	2005-12-13 13:49:47.000000000 +0100
@@ -690,7 +690,6 @@
 let op_client_info c =
   let module P = GuiTypes in
   let (ip,port) = c.client_host in
-  let id = c.client_uid in
   {
     P.client_network = network.network_num;
     P.client_kind = Known_location (ip,port);
@@ -731,7 +730,6 @@
   let info = file_info file in
   let buf = o.conn_buf in
   let cc = as_client c in
-  let cinfo = client_info cc in
   client_print cc o;
   Printf.bprintf buf (_b "\n%18sDown  : %-10s                  Uploaded: %-10s  Ratio: %s%1.1f (%s)\n") ""
     (Int64.to_string c.client_downloaded)
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/bittorrent/bTProtocol.ml ./src/networks/bittorrent/bTProtocol.ml
--- ./src/networks/bittorrent/bTProtocol.ml	2005-11-07 21:11:42.000000000 +0100
+++ ./src/networks/bittorrent/bTProtocol.ml	2005-12-13 13:49:47.000000000 +0100
@@ -534,7 +534,6 @@
                  peer_id is not fetched here because
                  it might be late or not present
                  *)
-              let proto = String.sub b.buf (b.pos+1) slen in
               let file_id = Sha1.direct_of_string
                 (String.sub b.buf (b.pos+9+slen) 20) in
               let proto,pos = get_string8 b.buf b.pos in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/bittorrent/bTTorrent.ml ./src/networks/bittorrent/bTTorrent.ml
--- ./src/networks/bittorrent/bTTorrent.ml	2005-08-05 00:00:23.000000000 +0200
+++ ./src/networks/bittorrent/bTTorrent.ml	2005-12-13 13:49:47.000000000 +0100
@@ -79,7 +79,6 @@
   let file_modified_by = ref "" in
   let file_encoding = ref "" in
   let file_ed2k_hash = ref "" in
-  let file_nodes = ref "" in
   let file_is_private = ref zero in
   let file_aps = ref (List []) in
   let file_dht_backup_enable = ref zero in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/bittorrent/bTTracker.ml ./src/networks/bittorrent/bTTracker.ml
--- ./src/networks/bittorrent/bTTracker.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/bittorrent/bTTracker.ml	2005-12-13 13:49:47.000000000 +0100
@@ -179,7 +179,7 @@
           failwith "[BT] Too many tracked files"
   in
 
-  let peer =
+  let _ =
     try
       let peer =
         Hashtbl.find tracker.tracker_table peer_id
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyClient.ml ./src/networks/donkey/donkeyClient.ml
--- ./src/networks/donkey/donkeyClient.ml	2005-12-05 19:37:34.000000000 +0100
+++ ./src/networks/donkey/donkeyClient.ml	2005-12-13 13:49:47.000000000 +0100
@@ -444,8 +444,6 @@
   
 let new_chunk up begin_pos end_pos =
   if begin_pos <> end_pos then
-    let len_requested = Int64.to_int (end_pos -- begin_pos) in
-    let len = Int64.to_int (end_pos -- begin_pos) in
     let pair = (begin_pos, end_pos) in
     (match up.up_chunks with
         [] ->
@@ -1367,8 +1365,6 @@
         
 with _ -> *)
       
-      let cc = as_client c in
-
 (* If the client is in the nolimit_ips list, he doesn't need a slot, so put
 it immediatly in the upload queue... but what will happen in the queue
 since the client upload should not be taken into account ! 
@@ -1645,7 +1641,6 @@
   
   | M.QueryFileReq t ->
       let md4 = t.M.QueryFile.md4 in
-      let emule_extension = t.M.QueryFile.emule_extension in
       c.client_requests_received <- c.client_requests_received + 1;
       
       if  !CommonUploads.has_upload = 0 && 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyComplexOptions.ml ./src/networks/donkey/donkeyComplexOptions.ml
--- ./src/networks/donkey/donkeyComplexOptions.ml	2005-11-07 21:11:42.000000000 +0100
+++ ./src/networks/donkey/donkeyComplexOptions.ml	2005-12-13 13:49:47.000000000 +0100
@@ -109,9 +109,6 @@
 
 let value_to_client is_friend assocs = 
   let get_value name conv = conv (List.assoc name assocs) in
-  let get_value_nil name conv = 
-    try conv (List.assoc name assocs) with _ -> []
-  in
   let (ip,port) = 
     try
       get_value "client_addr" (fun v ->
@@ -133,7 +130,7 @@
         Indirect_location(name, md4) *)
   in
   
-  let last_conn = 
+  let _ = 
     try
       let last_conn =
         (min (get_value "client_age" value_to_int) 
@@ -204,9 +201,6 @@
 
 let value_to_server assocs = 
   let get_value name conv = conv (List.assoc name assocs) in
-  let get_value_nil name conv = 
-    try conv (List.assoc name assocs) with _ -> []
-  in
   let ip, port = get_value "server_addr" (fun v ->
         match v with
           List [ip;port] | SmallList [ip;port] ->
@@ -436,11 +430,6 @@
     let value_to_shinfo v =
       match v with
         Options.Module assocs ->
-          let get_value name conv = conv (List.assoc name assocs) in
-          let get_value_nil name conv = 
-            try conv (List.assoc name assocs) with _ -> []
-          in
-          
           let sh_md4s = try
               value_to_array (fun v ->
                   Md4.of_string (value_to_string v)) (List.assoc "md4s" assocs)
@@ -481,10 +470,6 @@
     let value_to_stat v =
       match v with
         Options.Module assocs ->
-          let get_value name conv = conv (List.assoc name assocs) in
-          let get_value_nil name conv = 
-            try conv (List.assoc name assocs) with _ -> []
-          in
           { 
             brand_seen = value_to_int (List.assoc "seen" assocs);
             brand_banned = value_to_int (List.assoc "banned" assocs);
@@ -513,10 +498,6 @@
     let value_to_mod_stat v =
       match v with
         Options.Module assocs ->
-          let get_value name conv = conv (List.assoc name assocs) in
-          let get_value_nil name conv = 
-            try conv (List.assoc name assocs) with _ -> []
-          in
           { 
             brand_seen = value_to_int (List.assoc "mseen" assocs);
             brand_banned = value_to_int (List.assoc "mbanned" assocs);
@@ -617,12 +598,12 @@
     try
       ignore (DonkeyGlobals.find_server ip port)
     with _ ->
-        let s = DonkeyGlobals.new_server ip port !!initial_score in
+        let _ = DonkeyGlobals.new_server ip port !!initial_score in
         DonkeyGlobals.servers_ini_changed := true
         
 let remove_server ip port =
   try
-    let s = DonkeyGlobals.find_server ip port in
+    let _ = DonkeyGlobals.find_server ip port in
     DonkeyGlobals.servers_ini_changed := true;
     DonkeyGlobals.remove_server ip port
   with _ -> ()
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyGlobals.ml ./src/networks/donkey/donkeyGlobals.ml
--- ./src/networks/donkey/donkeyGlobals.ml	2005-11-19 16:37:40.000000000 +0100
+++ ./src/networks/donkey/donkeyGlobals.ml	2005-12-13 13:49:47.000000000 +0100
@@ -320,7 +320,7 @@
   with _ ->
       if !verbose_share then
         lprintf_nl () "New file with md4: %s" (Md4.to_string md4);
-      let file_exists = Unix32.file_exists file_diskname in
+      let _ = Unix32.file_exists file_diskname in
 
       let t =
         if
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyInteractive.ml ./src/networks/donkey/donkeyInteractive.ml
--- ./src/networks/donkey/donkeyInteractive.ml	2005-12-06 20:34:05.000000000 +0100
+++ ./src/networks/donkey/donkeyInteractive.ml	2005-12-13 13:49:47.000000000 +0100
@@ -139,7 +139,7 @@
         let file = Zip.find_entry ic "server.met" in
           Zip.close_in ic;
     lprintf_nl () "server.met found in %s" url;
-    let s = Misc.archive_extract filename "zip" in
+    let _ = Misc.archive_extract filename "zip" in
       file.Zip.filename
         with e ->
     Zip.close_in ic;
@@ -170,7 +170,6 @@
     | _ -> filename
 
 let download_server_met url =
-  let nservers = List.length (Hashtbl2.to_list servers_by_key) in
   let module H = Http_client in
     let r = {
       H.basic_request with
@@ -324,7 +323,7 @@
   else
     begin
       try
-        let file = find_file md4 in
+        let _ = find_file md4 in
 (* jave TODO: if a user currently not downloading this file is requesting the download add this user
    to the list of users currently downloading this file *)
 	  forceable_download := [];
@@ -404,7 +403,7 @@
                     size := v
                 | _ -> ()
             ) f.P.tags;
-            let file = query_download !filenames !size f.P.md4 None
+            let _ = query_download !filenames !size f.P.md4 None
               (Some filename) (Some (List.rev f.P.absents)) true;
             in
             ()
@@ -579,14 +578,13 @@
         let ip = Ip.from_name ip in
         let port = int_of_string port in
 
-        let s = force_add_server ip port in
+        let _ = force_add_server ip port in
         Printf.bprintf buf "New server %s:%d\n"
           (Ip.to_string ip) port;
         ""
     ), "<ip> [<port>] :\t\t\tadd a server";
 
     "afr", Arg_multiple (fun args o ->
-        let buf = o.conn_buf in
         let ip, port =
           match args with
             [ip ; port] -> ip, port
@@ -601,15 +599,14 @@
     ),  "<ip> [<port>] :\t\t\tadd a friend";
 
     "vu", Arg_none (fun o ->
-        let buf = o.conn_buf in
         Printf.sprintf
           "Upload credits : %d minutes\nUpload disabled for %d minutes"
           !CommonUploads.upload_credit !CommonUploads.has_upload;
 
     ), ":\t\t\t\t\tview upload credits";
 
+(*
     "comments", Arg_one (fun filename o ->
-        let buf = o.conn_buf in
 (* TODO        DonkeyIndexer.load_comments filename;
         DonkeyIndexer.save_comments (); *)
         "comments loaded and saved"
@@ -621,9 +618,9 @@
 (* TODO        DonkeyIndexer.add_comment md4 comment; *)
         "Comment added"
     ), "<md4> \"<comment>\" :\t\tadd comment on a md4";
+*)
 
     "import", Arg_one (fun dirname o ->
-        let buf = o.conn_buf in
         try
           import_config dirname;
           "config loaded"
@@ -633,7 +630,6 @@
     ), "<dirname> :\t\t\timport the config from dirname";
 
     "import_temp", Arg_one (fun dirname o ->
-        let buf = o.conn_buf in
         try
           import_temp dirname;
           "temp files loaded"
@@ -642,14 +638,14 @@
               Printexc2.to_string e)
     ), "<temp_dir> :\t\t\timport the old edonkey temp directory";
 
+(*
     "load_old_history", Arg_none (fun o ->
-        let buf = o.conn_buf in
 (* TODO        DonkeyIndexer.load_old_history (); *)
         "Old history loaded"
     ), ":\t\t\tload history.dat file";
+*)
 
     "servers", Arg_one (fun filename o ->
-        let buf = o.conn_buf in
   if !!update_server_list_server_met then
     begin
       let nservers = List.length (Hashtbl2.to_list servers_by_key) in
@@ -897,14 +893,12 @@
     ), ":\t\t\t\t\textend the last search";
 
     "clh", Arg_none (fun o ->
-        let buf = o.conn_buf in
 (* TODO RESULT        DonkeyIndexer.clear (); *)
         "local history cleared"
     ), ":\t\t\t\t\tclear local history";
 
 (* TODO RESULT *)
     "dd", Arg_two(fun size md4 o ->
-        let buf = o.conn_buf in
         let file = query_download [] (Int64.of_string size)
           (Md4.of_string md4) None None None false in
         CommonInteractive.start_download file;
@@ -1344,8 +1338,6 @@
       List.iter (fun (s,c) ->
         let ac = as_client c in
         try
-          let i = client_info ac in
-
           Printf.bprintf buf "\\<tr onMouseOver=\\\"mOvr(this);\\\" onMouseOut=\\\"mOut(this);\\\" class=\\\"dl-%d\\\"\\>"
             (html_mods_cntr());
 
@@ -1476,7 +1468,7 @@
             with _ -> *)
             []
         in
-        let file =
+        let _ =
           query_download names size md4 None (Some file_diskname) None true
         in
         recover_md4s md4
@@ -1630,7 +1622,6 @@
                 let qfiles = c.client_file_queue in
                 let (qfile, qchunks,_) =  List.hd qfiles in
                 if (qfile == (as_file_impl file).impl_file_val) then begin
-                    let i = (client_info (as_client c)) in
 
                     Printf.bprintf buf " \\<tr onMouseOver=\\\"mOvr(this);\\\" onMouseOut=\\\"mOut(this);\\\"
       class=\\\"%s\\\"\\> \\<td title=\\\"Add as friend\\\" class=\\\"srb ar\\\"
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyMain.ml ./src/networks/donkey/donkeyMain.ml
--- ./src/networks/donkey/donkeyMain.ml	2005-11-05 17:23:40.000000000 +0100
+++ ./src/networks/donkey/donkeyMain.ml	2005-12-13 13:49:47.000000000 +0100
@@ -227,7 +227,6 @@
                 (Printexc2.to_string e) (file_disk_name file); 
       ) files_by_md4;
       
-      let list = ref [] in
 (* Normally, we should check that downloaded files are still there.  *)    
       let list = ref [] in
       List.iter (fun file ->
@@ -285,8 +284,6 @@
         | _ -> failwith "Bad socket address"
       end;
       
-      let port = !!donkey_port in
-      
       reset_tags ();
       
       Options.option_hook global_login reset_tags;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyOneFile.ml ./src/networks/donkey/donkeyOneFile.ml
--- ./src/networks/donkey/donkeyOneFile.ml	2005-11-12 12:20:21.000000000 +0100
+++ ./src/networks/donkey/donkeyOneFile.ml	2005-12-13 13:49:47.000000000 +0100
@@ -327,7 +327,7 @@
   | Some (file,up) ->
       
       try
-        let b = Int64Swarmer.current_block up in
+        let _ = Int64Swarmer.current_block up in
         let ranges = Int64Swarmer.current_ranges up in
         let before_find_range = List.length ranges in
 
@@ -366,7 +366,7 @@
           try
             let swarmer = Int64Swarmer.uploader_swarmer up in       
             (try Int64Swarmer.verify_one_chunk swarmer with _ -> ());
-            let b = Int64Swarmer.find_block up in
+            let _ = Int64Swarmer.find_block up in
             get_from_client c
             
           with Not_found ->
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyOvernet.ml ./src/networks/donkey/donkeyOvernet.ml
--- ./src/networks/donkey/donkeyOvernet.ml	2005-11-09 17:41:57.000000000 +0100
+++ ./src/networks/donkey/donkeyOvernet.ml	2005-12-13 14:05:43.000000000 +0100
@@ -787,7 +787,6 @@
 
             if Fifo.length prebuckets.(bucket) = max_peers_per_prebucket then
 	    begin
-              let l = last_time () - 1800 in
               let pp = Fifo.take prebuckets.(bucket) in
               Fifo.put prebuckets.(bucket)
 (* If the head of the bucket is not dead we should keep it *)
@@ -997,7 +996,7 @@
             let sender = new_peer { p with peer_port = other_port ; peer_ip = other_ip } in
             new_peer_message sender
         | p :: tail ->
-            let p = new_peer p in
+            let _ = new_peer p in
             iter tail
       in
       iter ps;
@@ -1256,8 +1255,7 @@
 
 let recover_file file =
   if file_state file = FileDownloading then
-    let search = create_search (FileSearch file) file.file_md4 in
-    ()
+    ignore (create_search (FileSearch file) file.file_md4)
 
 let check_current_downloads () =
   List.iter recover_file !DonkeyGlobals.current_files
@@ -1448,13 +1446,13 @@
 (* every 15min for light operations *)
       add_session_timer enabler 900. (fun _ ->
           if !!enable_overnet then begin
-              let s = create_search FillBuckets !!overnet_md4 in
+              let _ = create_search FillBuckets !!overnet_md4 in
               check_current_downloads ();
             end
       );
 
       begin
-        let s = create_search FillBuckets !!overnet_md4 in
+        let _ = create_search FillBuckets !!overnet_md4 in
         check_current_downloads ();
       end;
       
@@ -1571,7 +1569,6 @@
     ), ("<ip> <port> :\t\t\tadd an " ^ command_prefix_to_net ^ " peer");
 
     "link", Arg_multiple (fun args o ->
-        let buf = o.conn_buf in
         let url = String2.unsplit args ' ' in
         if parse_overnet_url url then
           "download started"
@@ -1598,7 +1595,7 @@
     ), (":\t\t\t\t" ^ command_prefix_to_net ^ " Stats commands");
 
     "stats", Arg_none (fun o ->
-        let buf = o.conn_buf and sum = ref 0 in
+        let buf = o.conn_buf in
         if o.conn_output = HTML then
           begin
             Printf.bprintf buf "\\<div class=results\\>";
@@ -1689,7 +1686,6 @@
     ), "<urls> :\t\t\t\tdownload .ocl URLS (no arg load default)";
 
     "load", Arg_one (fun filename o ->
-        let buf = o.conn_buf in
         try
           let n = load_contact_dat filename in
           Printf.sprintf "%d overnet peers loaded" n;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyPandora.ml ./src/networks/donkey/donkeyPandora.ml
--- ./src/networks/donkey/donkeyPandora.ml	2005-11-19 18:19:45.000000000 +0100
+++ ./src/networks/donkey/donkeyPandora.ml	2005-12-13 13:49:47.000000000 +0100
@@ -200,7 +200,6 @@
       
       
       let b = Buffer.create 100 in
-      let magic = DonkeyProtoClient.write emule b t in
       let ss = Buffer.contents b in
       if ss <> s then begin
           if opcode = 212 then begin
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyProtoClient.ml ./src/networks/donkey/donkeyProtoClient.ml
--- ./src/networks/donkey/donkeyProtoClient.ml	2005-12-05 19:37:34.000000000 +0100
+++ ./src/networks/donkey/donkeyProtoClient.ml	2005-12-13 13:49:47.000000000 +0100
@@ -655,7 +655,6 @@
       let len = get_int16 s 1 in
       let md4 = get_md4 s 3 in
       let list = ref [] in
-      let pos = 19 in
       for i = 0 to len - 1 do
         list := (get_ip s (19 + 10 * i), get_port s (23 + 10 * i),
           get_ip  s (25 + 10 * i)) :: !list;
@@ -1143,7 +1142,6 @@
 
 (*        lprintf "MULTI EMULE VERSION %d"
           (extendedrequest emule); print_newline (); *)
-        let pos = 17 in
         let rec iter pos =
           if pos < len then
             let opcode = get_uint8 s pos in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyProtoKademlia.ml ./src/networks/donkey/donkeyProtoKademlia.ml
--- ./src/networks/donkey/donkeyProtoKademlia.ml	2005-10-31 19:07:11.000000000 +0100
+++ ./src/networks/donkey/donkeyProtoKademlia.ml	2005-12-13 13:49:47.000000000 +0100
@@ -226,7 +226,6 @@
       let ip = get_ip s (pos+16) in
       let udp_port = get_int16 s (pos + 20) in
       let tcp_port = get_int16 s (pos + 22) in
-      let kind = get_uint8 s (pos + 24) in
       {
         peer_md4 = md4;
         peer_ip = ip;
@@ -283,7 +282,6 @@
           OvernetConnect p
 
       | 0x08 ->
-          let n = get_int16 s 0 in
           let peers, pos = get_list16 get_peer s 0 in
           OvernetConnectReply peers
 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyProtoOvernet.ml ./src/networks/donkey/donkeyProtoOvernet.ml
--- ./src/networks/donkey/donkeyProtoOvernet.ml	2005-10-31 19:07:11.000000000 +0100
+++ ./src/networks/donkey/donkeyProtoOvernet.ml	2005-12-13 13:49:47.000000000 +0100
@@ -51,7 +51,6 @@
       let md4 = get_md4 s pos in
       let ip = get_ip s (pos+16) in
       let port = get_int16 s (pos+20) in
-      let kind = get_uint8 s (pos+22) in
       {
         peer_md4 = md4;
         peer_ip = ip;
@@ -184,7 +183,6 @@
       let peer_ip = ref ip in
       let peer_udpport = ref port in
       let peer_tcpport = ref 0 in
-      let peer_kind = ref 0 in
       List.iter (fun tag ->
           match tag.tag_name with
             Field_UNKNOWN "loc" ->
@@ -238,7 +236,6 @@
             let md4 = get_md4 s 0 in
             let ip = get_ip s 16 in
             let port = get_int16 s 20 in
-            let kind = get_uint8 s 22 in
             OvernetConnect {
               peer_md4 = md4;
               peer_ip = ip;
@@ -256,7 +253,6 @@
             let md4 = get_md4 s 0 in
             let ip = get_ip s 16 in
             let port = get_int16 s 20 in
-            let kind = get_uint8 s 22 in
             OvernetPublicize {
               peer_md4 = md4;
               peer_ip = ip;
@@ -431,7 +427,6 @@
             lprintf_nl () "Sending UDP to %s:%d (opcode 0x%02X len %d) type %s"
               (Ip.to_string ip) port (get_uint8 s 1) (String.length s) (message_to_string msg);
           end;
-        let len = String.length s in
         UdpSocket.write sock ping s ip port
       with e ->
           lprintf_nl () "Exception %s in udp_send" (Printexc2.to_string e)
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeyShare.ml ./src/networks/donkey/donkeyShare.ml
--- ./src/networks/donkey/donkeyShare.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/donkey/donkeyShare.ml	2005-12-13 13:49:47.000000000 +0100
@@ -170,7 +170,6 @@
   if !new_shared then
     begin
       new_shared := false;
-      let socks = ref [] in
       if !new_shared_files <> [] then
         begin
           List.iter (fun s ->
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/donkey/donkeySupernode.ml ./src/networks/donkey/donkeySupernode.ml
--- ./src/networks/donkey/donkeySupernode.ml	2005-10-06 16:03:05.000000000 +0200
+++ ./src/networks/donkey/donkeySupernode.ml	2005-12-13 13:49:47.000000000 +0100
@@ -105,7 +105,6 @@
       begin
         try
     node.node_files <- t;
-          let list = ref [] in
           List.iter (fun f ->
               match result_of_file f.f_md4 f.f_tags with
                 None -> ()
@@ -130,7 +129,7 @@
       ()
 
 let supernode_browse_client node =
-  let token =
+  let _ =
     add_pending_connection connection_manager (fun token ->
         try
           let sock = TcpBufferedSocket.connect token "supernode browse client"
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fasttrack/fasttrackGlobals.ml ./src/networks/fasttrack/fasttrackGlobals.ml
--- ./src/networks/fasttrack/fasttrackGlobals.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/fasttrack/fasttrackGlobals.ml	2005-12-13 13:49:47.000000000 +0100
@@ -259,8 +259,6 @@
       file_size // (max 5L (file_size // (megabytes 5)))
     )
   in
-  let keywords = CommonUploads.words_of_filename file_name in
-  let words = String2.unsplit keywords ' ' in
   let uid = Uid.create (Md5Ext file_hash) in
   let rec file = {
       file_file = file_impl;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fasttrack/fasttrackHandler.ml ./src/networks/fasttrack/fasttrackHandler.ml
--- ./src/networks/fasttrack/fasttrackHandler.ml	2005-08-07 14:57:22.000000000 +0200
+++ ./src/networks/fasttrack/fasttrackHandler.ml	2005-12-13 14:06:57.000000000 +0100
@@ -126,8 +126,7 @@
 
         List.iter (fun (ip,port,seen,slots) ->
             try
-              let (h : host) = H.new_host (Ip.addr_of_ip ip) port Ultrapeer in
-              ()
+              ignore (H.new_host (Ip.addr_of_ip ip) port Ultrapeer)
             with Not_found -> ()
         ) list;
 
@@ -157,8 +156,7 @@
             try
               let ip = n.M.neighbour_ip in
               let port = n.M.neighbour_port in
-              let (h : host) = H.new_host (Ip.addr_of_ip ip) port Ultrapeer in
-              ()
+                ignore (H.new_host (Ip.addr_of_ip ip) port Ultrapeer)
             with Not_found -> ()
         ) list;
 
@@ -195,7 +193,6 @@
                       result_name
                       meta.M.meta_size
                       meta.M.meta_tags [meta.M.meta_hash] [] in
-                  let r = IndexedResults.get_result rs in
                   add_source rs user;
                   CommonInteractive.search_add_result false sss rs
 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fasttrack/fasttrackPandora.ml ./src/networks/fasttrack/fasttrackPandora.ml
--- ./src/networks/fasttrack/fasttrackPandora.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/fasttrack/fasttrackPandora.ml	2005-12-13 13:49:47.000000000 +0100
@@ -667,8 +667,6 @@
   let rec iter pos =
     if pos < len then
       if s.[pos] = '\000' then begin
-          let netname = String.sub s start_pos (pos-start_pos) in
-(*          lprintf "netname: [%s]\n" (String.escaped netname);*)
           c.c_pos <- pos + 1;
           c.c_parser <- parse_packets;
           parse_packets c
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fasttrack/fasttrackProtocol.ml ./src/networks/fasttrack/fasttrackProtocol.ml
--- ./src/networks/fasttrack/fasttrackProtocol.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/fasttrack/fasttrackProtocol.ml	2005-12-13 13:49:47.000000000 +0100
@@ -70,8 +70,6 @@
     UdpSocket.READ_DONE ->
       UdpSocket.read_packets sock (fun p ->
           try
-            let pbuf = p.UdpSocket.udp_content in
-            let len = String.length pbuf in
             f p
           with e ->
               lprintf "Error %s in udp_handler\n"
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fasttrack/fasttrackProto.ml ./src/networks/fasttrack/fasttrackProto.ml
--- ./src/networks/fasttrack/fasttrackProto.ml	2005-12-02 13:02:36.000000000 +0100
+++ ./src/networks/fasttrack/fasttrackProto.ml	2005-12-13 13:49:47.000000000 +0100
@@ -914,7 +914,7 @@
             let tag =
               try
                 List2.assoc_inv tag name_of_tag
-              with Not_found as e ->
+              with Not_found ->
                   lprintf "WARNING Unknown tag %d\n" tag;
                   Field_UNKNOWN (string_of_int tag)
             in
@@ -990,7 +990,6 @@
             let my_port = get_int16 m 4 in
 
             let bandwidth = get_int8 m 6 in
-            let next_byte = get_int8 m 7 in
 
             let client_name = String.sub m 8 (String.length m - 8) in
 
@@ -1174,7 +1173,6 @@
             AskUDPConnectionReq (LittleEndian.get_ip m 0, get_int16 m 4)
 
         | 0x1d ->
-            let netname = m in
             NetworkNameReq m
 
         | 0x1e -> Unknown_1e (get_int m 0)
@@ -1918,7 +1916,6 @@
   let add_words w =
     keywords := (String2.split_simplify w ' ') @ !keywords
   in
-  let audio = ref false in
   let tags = ref [] in
   let rec iter q =
     match q with
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fasttrack/fasttrackServers.ml ./src/networks/fasttrack/fasttrackServers.ml
--- ./src/networks/fasttrack/fasttrackServers.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/fasttrack/fasttrackServers.ml	2005-12-13 13:49:47.000000000 +0100
@@ -399,7 +399,7 @@
 (*        lprintf "not in ultrapeers_waiting_queue\n";   *)
         if !!bootstrap_from_imesh then
 	  let imesh_ip = Ip.addr_of_string "fm2.imesh.com" in
-          let (h : host) =
+          let (_ : host) =
 	    if !verbose then lprintf_nl "FT: Bootstrapping from Imesh %s" (Ip.string_of_addr imesh_ip);
             H.new_host (Ip.addr_of_string "fm2.imesh.com") 1214 IndexServer in
           find_ultrapeer peers_waiting_queue
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fileTP/fileTPClients.ml ./src/networks/fileTP/fileTPClients.ml
--- ./src/networks/fileTP/fileTPClients.ml	2005-12-06 21:26:40.000000000 +0100
+++ ./src/networks/fileTP/fileTPClients.ml	2005-12-13 13:49:47.000000000 +0100
@@ -70,7 +70,6 @@
           close sock r;
           c.client_sock <- NoConnection;
           List.iter (fun d ->
-              let file = d.download_file in
               match d.download_uploader with
                 None -> ()
               | Some up ->
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fileTP/fileTPComplexOptions.ml ./src/networks/fileTP/fileTPComplexOptions.ml
--- ./src/networks/fileTP/fileTPComplexOptions.ml	2005-11-05 17:23:40.000000000 +0100
+++ ./src/networks/fileTP/fileTPComplexOptions.ml	2005-12-13 13:49:47.000000000 +0100
@@ -38,9 +38,6 @@
       | Module assocs ->
 
           let get_value name conv = conv (List.assoc name assocs) in
-          let get_value_nil name conv =
-            try conv (List.assoc name assocs) with _ -> []
-          in
           let client_hostname = get_value "client_hostname" value_to_string in
           let client_port = get_value "client_port" value_to_int in
           let client_proto = try
@@ -86,9 +83,6 @@
 
 let value_to_file file_size file_state assocs =
   let get_value name conv = conv (List.assoc name assocs) in
-  let get_value_nil name conv =
-    try conv (List.assoc name assocs) with _ -> []
-  in
 
   let file_name = get_value "file_filename" value_to_string in
   let file_id =
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fileTP/fileTPFTP.ml ./src/networks/fileTP/fileTPFTP.ml
--- ./src/networks/fileTP/fileTPFTP.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/fileTP/fileTPFTP.ml	2005-12-13 13:49:47.000000000 +0100
@@ -80,8 +80,6 @@
         | Some up ->
 
             let swarmer = Int64Swarmer.uploader_swarmer up in
-            let old_downloaded =
-              Int64Swarmer.downloaded swarmer in
 
             Int64Swarmer.received up
               !counter_pos b.buf b.pos to_read_int;
@@ -129,7 +127,6 @@
         ()
     )
   in
-  let nread = ref false in
   TcpBufferedSocket.set_reader sock (range_reader c d (ref x) y);
   set_rtimeout sock 15.;
   TcpBufferedSocket.set_closer sock (fun _ _ ->
@@ -310,7 +307,6 @@
             ()
         )
       in
-      let nread = ref false in
       TcpBufferedSocket.write_string sock request;
       TcpBufferedSocket.set_reader sock (fun sock nread ->
           let b = TcpBufferedSocket.buf sock in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fileTP/fileTPHTTP.ml ./src/networks/fileTP/fileTPHTTP.ml
--- ./src/networks/fileTP/fileTPHTTP.ml	2005-12-06 21:26:40.000000000 +0100
+++ ./src/networks/fileTP/fileTPHTTP.ml	2005-12-13 13:49:47.000000000 +0100
@@ -257,9 +257,8 @@
         if !verbose then lprintf_nl () "Specified length: %Ld" len;
         if len <> end_pos -- start_pos then
           begin
-            failwith "\n\nERROR: bad computed range: %Ld-%Ld/%Ld \n%s\n"
-              start_pos end_pos len
-              (String.escaped header);
+            failwith (Printf.sprintf "ERROR: bad computed range: %Ld-%Ld/%Ld \n%s\n"
+              start_pos end_pos len (String.escaped header))
           end
       with _ ->
           lprintf_nl () "[WARNING]: no Content-Length field\n%s\n"
@@ -297,8 +296,6 @@
         let swarmer = match file.file_swarmer with
             None -> assert false | Some sw -> sw
         in
-        let old_downloaded =
-          Int64Swarmer.downloaded swarmer in
 (*        List.iter (fun (_,_,r) -> Int64Swarmer.free_range r)
         d.download_ranges; *)
 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fileTP/fileTPProtocol.ml ./src/networks/fileTP/fileTPProtocol.ml
--- ./src/networks/fileTP/fileTPProtocol.ml	2005-07-27 01:16:48.000000000 +0200
+++ ./src/networks/fileTP/fileTPProtocol.ml	2005-12-13 13:49:47.000000000 +0100
@@ -163,8 +163,6 @@
     UdpSocket.READ_DONE ->
       UdpSocket.read_packets sock (fun p ->
           try
-            let pbuf = p.UdpSocket.udp_content in
-            let len = String.length pbuf in
             f p
           with e ->
               lprintf "Error %s in udp_handler\n"
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/fileTP/fileTPSSH.ml ./src/networks/fileTP/fileTPSSH.ml
--- ./src/networks/fileTP/fileTPSSH.ml	2005-07-27 01:16:48.000000000 +0200
+++ ./src/networks/fileTP/fileTPSSH.ml	2005-12-13 13:49:47.000000000 +0100
@@ -93,8 +93,6 @@
         | Some up ->
 
             let swarmer = Int64Swarmer.uploader_swarmer up in
-            let old_downloaded =
-              Int64Swarmer.downloaded swarmer in
             Int64Swarmer.received up
               pos s 0 (String.length s);
 
@@ -233,7 +231,6 @@
 | SegmentX of int * int64 * int * int * string
 
 let ssh_connect token c f =
-  let ip = c.client_hostname in
   let shell, args = shell_command c.client_hostname in
   let sock, pid = exec_command token  shell args (fun _ _ -> ());
   in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella/gnutellaClients.ml ./src/networks/gnutella/gnutellaClients.ml
--- ./src/networks/gnutella/gnutellaClients.ml	2005-12-06 21:26:40.000000000 +0100
+++ ./src/networks/gnutella/gnutellaClients.ml	2005-12-13 13:49:47.000000000 +0100
@@ -264,7 +264,6 @@
   let up = match d.download_uploader with
       None -> assert false
     | Some up -> up in
-  let swarmer = Int64Swarmer.uploader_swarmer up in
   
   let file = d.download_file in
   
@@ -273,12 +272,6 @@
       raise Exit;
     end;
 
-(*
-  lprintf "CHUNK: %s\n" 
-          (String.escaped (String.sub b.buf b.pos to_read_int)); *)
-  let old_downloaded = 
-    Int64Swarmer.downloaded swarmer in
-  
   begin
     try
       Int64Swarmer.received up
@@ -288,16 +281,7 @@
           (Printexc2.to_string e);
 (* TODO: we should pause the download !!! *)
   end;
-  c.client_reconnect <- true;
-  
-  let new_downloaded = 
-    Int64Swarmer.downloaded swarmer in
-  
-(*
-lprintf "READ %Ld\n" (new_downloaded -- old_downloaded);
-lprintf "READ: buf_used %d\n" to_read_int;
-  *)
-  ()
+  c.client_reconnect <- true
 
 (*************************************************************************)
 (*                                                                       *)
@@ -325,8 +309,6 @@
 
 (* The reply should be  "HTTP/1.1 200 OK" *)
     let space_pos = String.index first_line ' ' in
-    let slash_pos = String.index first_line '/' in
-    let proto = String.sub first_line (slash_pos+1) (space_pos - slash_pos) in
     let code = String.sub first_line (space_pos+1) 3 in
     let code = int_of_string code in
     
@@ -765,7 +747,6 @@
         lprintf "PARSING GIV HEADER\n"; 
       end;
     let colon_pos = String.index first_line ':' in
-    let slash_pos = String.index first_line '/' in
     let uid = Md4.of_string (String.sub first_line (colon_pos+1) 32) in
     let index = int_of_string (String.sub first_line 4 (colon_pos-4)) in
     if !verbose_msg_clients then begin
@@ -1110,7 +1091,7 @@
 (*************************************************************************)
       
 let push_connection guid index ip port =
-  let token =
+  let _ =
     add_pending_connection connection_manager (fun token ->
         let sh =Hashtbl.find shareds_by_id index in
         let sock = connect token "gnutella download" 
@@ -1143,7 +1124,7 @@
         write_string sock 
           (Printf.sprintf "GIV %d:%s/%s\n\n" 
             index (Md4.to_string guid) sh.shared_codedname)
-    )    
+    )
 
   in
   ()
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella/gnutellaComplexOptions.ml ./src/networks/gnutella/gnutellaComplexOptions.ml
--- ./src/networks/gnutella/gnutellaComplexOptions.ml	2005-11-05 17:23:41.000000000 +0100
+++ ./src/networks/gnutella/gnutellaComplexOptions.ml	2005-12-13 13:49:47.000000000 +0100
@@ -52,9 +52,6 @@
       | Module assocs ->
           
           let get_value name conv = conv (List.assoc name assocs) in
-          let get_value_nil name conv = 
-            try conv (List.assoc name assocs) with _ -> []
-          in
           let client_ip = get_value "client_ip" (from_value Ip.option)
           in
           let client_port = get_value "client_port" value_to_int in
@@ -106,10 +103,6 @@
 
 let value_to_file file_size file_state assocs =
   let get_value name conv = conv (List.assoc name assocs) in
-  let get_value_nil name conv = 
-    try conv (List.assoc name assocs) with _ -> []
-  in
-  
   let file_name = get_value "file_name" value_to_string in
   let file_temp = 
     try
@@ -268,9 +261,6 @@
       in
       ultrapeers =:= List2.tail_map fst ultrapeers_list;
       
-      let peers_list = List.sort (fun (_, a1) (_, a2) -> 
-            
-            compare a2 a1) !peers_list in
       let peers_list, _ = List2.cut !!max_known_peers ultrapeers_list
       in
       peers =:= List2.tail_map fst peers_list;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella/gnutellaGlobals.ml ./src/networks/gnutella/gnutellaGlobals.ml
--- ./src/networks/gnutella/gnutellaGlobals.ml	2005-09-03 01:48:54.000000000 +0200
+++ ./src/networks/gnutella/gnutellaGlobals.ml	2005-12-13 13:49:47.000000000 +0100
@@ -260,8 +260,7 @@
             Hashtbl.add results_by_uid (Uid.to_uid uid) rs;
             rs
       in
-      let r = IndexedResults.get_result rs in
-(*
+(*      let r = IndexedResults.get_result rs in
       let rec iter_uid uid =
         if not (List.mem uid r.result_uids) then begin
             r.result_uids <- uid :: r.result_uids;
@@ -291,8 +290,6 @@
 let new_file file_temporary file_name file_size file_uids = 
   let file_temp = Filename.concat !!temp_directory file_temporary in
   let t = Unix32.create_rw file_temp in
-  let keywords = CommonUploads.words_of_filename file_name in
-  let words = String2.unsplit keywords ' ' in
   let rec file = {
       file_file = file_impl;
       file_temp = file_temporary;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella/gnutellaInteractive.ml ./src/networks/gnutella/gnutellaInteractive.ml
--- ./src/networks/gnutella/gnutellaInteractive.ml	2005-11-12 23:53:52.000000000 +0100
+++ ./src/networks/gnutella/gnutellaInteractive.ml	2005-12-13 13:49:47.000000000 +0100
@@ -378,7 +378,7 @@
       | "gnut://" :: "server" :: ip :: port :: _ ->  
           let ip = Ip.addr_of_string ip in
           let port = int_of_string port in
-          let s = new_server ip port in
+          let _ = new_server ip port in
           true
       | "gnut://" :: "friend" :: uid :: ip :: port :: _ ->  
           let ip = Ip.of_string ip in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella/gnutellaMain.ml ./src/networks/gnutella/gnutellaMain.ml
--- ./src/networks/gnutella/gnutellaMain.ml	2005-08-09 12:52:02.000000000 +0200
+++ ./src/networks/gnutella/gnutellaMain.ml	2005-12-13 13:49:47.000000000 +0100
@@ -72,8 +72,6 @@
       UdpSocket.read_packets sock (fun p -> 
           try
 (*            lprintf "Gnutella: udp one packet...\n"; *)
-            let pbuf = p.UdpSocket.udp_content in
-            let len = String.length pbuf in
             let (ip,port) = match p.UdpSocket.udp_addr with
               | Unix.ADDR_INET(ip, port) -> Ip.of_inet_addr ip, port
               | _ -> raise Not_found
@@ -81,7 +79,6 @@
 (*            lprintf "Gnutella: calling udp_client_handler %s:%d\n"
               (Ip.to_string ip) port; *)
             let buf = p.UdpSocket.udp_content in
-            let len = String.length buf in
             GnutellaHandler.udp_client_handler ip port buf 
           with e ->
               lprintf "Error %s in udp_handler\n"
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella/gnutellaProto.ml ./src/networks/gnutella/gnutellaProto.ml
--- ./src/networks/gnutella/gnutellaProto.ml	2005-10-06 12:21:10.000000000 +0200
+++ ./src/networks/gnutella/gnutellaProto.ml	2005-12-13 13:49:47.000000000 +0100
@@ -375,7 +375,6 @@
       let files, pos  = iter_files nfiles s 11 [] in
       
       let vendor = String.sub s pos 4 in
-      let vendor_len = get_uint8 s (pos+4) in
       let byte5 = get_uint8 s (pos+5) in
       let byte6 = get_uint8 s (pos+6) in
       
@@ -618,7 +617,6 @@
   | Some sock ->
       try
         let s = server_msg_to_string msg in
-        let len = String.length s in
         if !verbose_msg_servers then begin
             lprintf "Sending on UDP to %s:%d:\n%s\n"
               (Ip.to_string ip) port
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella/gnutellaRedirector.ml ./src/networks/gnutella/gnutellaRedirector.ml
--- ./src/networks/gnutella/gnutellaRedirector.ml	2005-09-01 02:04:12.000000000 +0200
+++ ./src/networks/gnutella/gnutellaRedirector.ml	2005-12-13 14:11:07.000000000 +0100
@@ -82,8 +82,7 @@
         let ip, port = String2.cut_at line ':' in
         if !verbose then
           lprintf "gnutella1: adding ultrapeer from hostfile\n";
-        let h = H.new_host (Ip.addr_of_string ip) (int_of_string port) Ultrapeer  in
-        ()
+        ignore (H.new_host (Ip.addr_of_string ip) (int_of_string port) Ultrapeer)
       with _ -> ()
   ) lines
 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella2/g2Handler.ml ./src/networks/gnutella2/g2Handler.ml
--- ./src/networks/gnutella2/g2Handler.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/networks/gnutella2/g2Handler.ml	2005-12-13 14:12:04.000000000 +0100
@@ -149,8 +149,7 @@
   | QKA ->
       H.host_queue_add active_udp_queue h (last_time ());
       if (Queues.Queue.length active_udp_queue) > 100 then
-        let oh = H.host_queue_take active_udp_queue in
-        ();
+        ignore (H.host_queue_take active_udp_queue);
       List.iter (fun c ->
           match c.g2_payload with
             QKA_QK key -> s.server_query_key <- UdpQueryKey key
@@ -202,8 +201,7 @@
           
           | Q2_MD xml ->
               begin try
-                  let xml = Xml.parse_string xml in
-                  ()
+                  ignore (Xml.parse_string xml)
                 with e -> 
                     lprintf "Error %s parsing Xml \n%s\n"
                       (Printexc2.to_string e)
@@ -290,7 +288,7 @@
           match c.g2_payload with
             KHL_NH (ip,port) 
           | KHL_CH ((ip,port),_) ->
-              let h = H.new_host (Ip.addr_of_ip ip) port Ultrapeer in ()
+              ignore (H.new_host (Ip.addr_of_ip ip) port Ultrapeer)
           | _ -> ()
       ) p.g2_children;
       let children = ref [] in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella2/g2Pandora.ml ./src/networks/gnutella2/g2Pandora.ml
--- ./src/networks/gnutella2/g2Pandora.ml	2004-11-01 12:23:02.000000000 +0100
+++ ./src/networks/gnutella2/g2Pandora.ml	2005-12-13 13:49:47.000000000 +0100
@@ -149,7 +149,7 @@
     if len > 0 then
       if deflate then
         let z = Zlib.inflate_init true in
-        let s =  
+        let _ =  
           let s2 = String.make 100000 '\000' in
           let f = Zlib.Z_SYNC_FLUSH in
           let (_,used_in, used_out) = Zlib.inflate z s1 0 len s2 0 100000 f in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella2/g2Proto.ml ./src/networks/gnutella2/g2Proto.ml
--- ./src/networks/gnutella2/g2Proto.ml	2005-11-19 18:19:45.000000000 +0100
+++ ./src/networks/gnutella2/g2Proto.ml	2005-12-13 13:49:47.000000000 +0100
@@ -933,7 +933,6 @@
           (char_of_int (counter land 0xff))
           (char_of_int ((counter lsr 8) land 0xff))
         in
-        let len = String.length s in
 (*        lprintf "ack sent\n"; *)
         UdpSocket.write sock false s ip port
       with e ->
@@ -1045,7 +1044,6 @@
   let nSequence = LittleEndian.get_int16 buf 4 in
   let nCount = get_uint8 buf 7 in
   let nFlags = get_uint8 buf 3 in
-  let ack_me = nFlags land 2 <> 0 in
 (* Contribute:
   - deflating
   - multi-parts message
@@ -1140,7 +1138,7 @@
             len_len name_len pkt_len
           ;
         );
-      let msg_len = 
+      let _ = 
         if len < pos + msg_len then 
           (lprintf "RECOVER: %d < %d + %d (1 + %d + %d + %d)\n" len pos msg_len
               len_len name_len pkt_len
@@ -1426,7 +1424,6 @@
       let pos = Int64.to_int pos in
       if !verbose then
         lprintf "ADDING WORD %d\n" pos; 
-      let index = pos / 8 in
       let bit = (1 lsl (pos land 7)) in
       array.(pos) <- array.(pos) lor bit;
   ) words;
@@ -1443,8 +1440,6 @@
   
   if update_table then cached_qrt_table := "";
   let table_size = 20 in
-  let infinity = 7 in
-  let table_length = 1 lsl table_size in
   server_send_qrt_reset s;
   
   if !cached_qrt_table = "" then 
@@ -1475,10 +1470,8 @@
   if String.sub buf 0 3 <> "GND" then
     lprintf "Not a GNUTELLA2 packet (no GND)\n"
   else
-  let nSequence = LittleEndian.get_int16 buf 4 in
   let nCount = get_uint8 buf 7 in
   let nFlags = get_uint8 buf 3 in
-  let ack_me = nFlags land 2 <> 0 in
 (* Contribute:
   - deflating
   - multi-parts message
@@ -1525,7 +1518,7 @@
             len_len name_len pkt_len
           ;
         );
-      let msg_len = 
+      let _ = 
         if len < pos + msg_len then 
           (lprintf "RECOVER: %d < %d + %d (1 + %d + %d + %d)\n" len pos msg_len
             len_len name_len pkt_len
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/networks/gnutella2/g2Redirector.ml ./src/networks/gnutella2/g2Redirector.ml
--- ./src/networks/gnutella2/g2Redirector.ml	2005-09-01 02:04:12.000000000 +0200
+++ ./src/networks/gnutella2/g2Redirector.ml	2005-12-13 14:13:22.000000000 +0100
@@ -48,9 +48,8 @@
           begin
             try
               let ip, port = String2.cut_at ip_port ':' in
-              let h = H.new_host 
-                  (Ip.addr_of_string ip) (int_of_string port) Ultrapeer in
-              ()
+                ignore (H.new_host
+		  (Ip.addr_of_string ip) (int_of_string port) Ultrapeer)
             with _ -> ()
           end
       | "u" :: url :: _ ->
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/cdk/file.ml ./src/utils/cdk/file.ml
--- ./src/utils/cdk/file.ml	2005-08-21 17:41:14.000000000 +0200
+++ ./src/utils/cdk/file.ml	2005-12-13 13:49:47.000000000 +0100
@@ -22,7 +22,6 @@
   let chan = open_in_bin name in
   let buf_size = 1024 in
   let buf = String.create buf_size in
-  let cont = ref true in
   let rec iter buf nb_read =
     let buf_size = String.length buf in
     let to_read = min (buf_size - nb_read) 8192 in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/cdk/printf2.ml ./src/utils/cdk/printf2.ml
--- ./src/utils/cdk/printf2.ml	2005-11-07 21:11:43.000000000 +0100
+++ ./src/utils/cdk/printf2.ml	2005-12-13 13:49:47.000000000 +0100
@@ -207,9 +207,9 @@
   (fmt : ('a,unit, unit) format )
 
 let lprint_newline () = lprintf "\n"
-let lprint_char c = lprintf "%c" c
-let lprint_int c = lprintf "%d" c
-let lprint_string c = lprintf "%s" c
+let lprint_char = lprintf "%c"
+let lprint_int = lprintf "%d"
+let lprint_string = lprintf "%s"
 
 let set_lprintf_handler f =
   lprintf_handler := f
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/cdk/unix2.ml ./src/utils/cdk/unix2.ml
--- ./src/utils/cdk/unix2.ml	2005-12-02 13:02:36.000000000 +0100
+++ ./src/utils/cdk/unix2.ml	2005-12-13 14:07:23.000000000 +0100
@@ -65,7 +65,7 @@
   else 
   if is_link dir then
     begin try
-      let dir = opendir dir in () 
+      ignore (opendir dir)
       with
         Unix.Unix_error (EACCES, _, _) -> lprintf_nl "access denied for directory %s" dir; exit 73
       | Unix.Unix_error (ENOENT, _, _) -> lprintf_nl "directory %s not found, orphaned link?" dir; exit 73
@@ -115,7 +115,7 @@
 let rename oldname newname =
   if oldname <> newname then
   try Unix.rename oldname newname with
-    Unix_error(EXDEV,_,_) as e ->
+    Unix_error(EXDEV,_,_) ->
 (* renaming is not enough, we must COPY *)
       lprintf_nl "COPY %s TO %s" oldname newname; 
       let copied = ref false in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/cdk/zip.ml ./src/utils/cdk/zip.ml
--- ./src/utils/cdk/zip.ml	2005-10-16 22:42:54.000000000 +0200
+++ ./src/utils/cdk/zip.ml	2005-12-13 13:49:47.000000000 +0100
@@ -143,9 +143,7 @@
   let magic = read4 ic in
   let disk_no = read2 ic in
   let cd_disk_no = read2 ic in
-  let disk_entries = read2 ic in
   let cd_entries = read2 ic in
-  let cd_size = read4_int ic in
   let cd_offset = read4_int ic in
   let comment_len = read2 ic in
   let comment = readstring ic comment_len in
@@ -162,8 +160,6 @@
     let e = ref [] in
     for num_entry = 1 to cd_entries do
       let magic = read4 ic in
-      let version_made_by = read2 ic in
-      let version_needed = read2 ic in
       let flags = read2 ic in
       let methd = read2 ic in
       let lastmod_time = read2 ic in
@@ -174,9 +170,6 @@
       let name_len = read2 ic in
       let extra_len = read2 ic in
       let comment_len = read2 ic in
-      let disk_number = read2 ic in
-      let internal_attr = read2 ic in
-      let external_attr = read4 ic in
       let header_offset = read4_int ic in
       let name = readstring ic name_len in
       let extra = readstring ic extra_len in
@@ -238,14 +231,6 @@
     let ic = ifile.if_channel in
     seek_in ic e.file_offset;
     let magic = read4 ic in
-    let version_needed = read2 ic in
-    let flags = read2 ic in
-    let methd = read2 ic in
-    let lastmod_time = read2 ic in
-    let lastmod_date = read2 ic in
-    let crc = read4 ic in
-    let compr_size = read4_int ic in
-    let uncompr_size = read4_int ic in
     let filename_len = read2 ic in
     let extra_len = read2 ic in
     if magic <> 0x04034b50l then
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/lib/avifile.ml ./src/utils/lib/avifile.ml
--- ./src/utils/lib/avifile.ml	2005-10-16 22:42:55.000000000 +0200
+++ ./src/utils/lib/avifile.ml	2005-12-13 13:49:47.000000000 +0100
@@ -154,33 +154,7 @@
               
               ignore (input_string4 ic);
 
-              
-              let dwMicroSecPerFrame = input_int32 ic in
-              let dwMaxBytesPerSec = input_int32 ic in
-              let dwPaddingGranularity = input_int32 ic in
-              let dwFlags = input_int32 ic in
-              let dwTotalFrames = input_int32 ic in
-              let dwInitialFrames = input_int32 ic in
-              let dwStreams = input_int32 ic in
-              let dwSuggestedBufferSize = input_int32 ic in              
-              let dwWidth = input_int32 ic in
-              let dwHeight = input_int32 ic in
-              
-              (*
-              print_int32 "dwMicroSecPerFrame" dwMicroSecPerFrame ;
-              print_int32 "dwMaxBytesPerSec" dwMaxBytesPerSec ;
-              print_int32 "dwPaddingGranularity" dwPaddingGranularity ;
-              print_int32 "dwFlags" dwFlags ;
-              print_int32 "dwTotalFrames" dwTotalFrames ;
-              print_int32 "dwInitialFrames" dwInitialFrames ;
-              print_int32 "dwStreams" dwStreams ;
-              print_int32 "dwSuggestedBufferSize" dwSuggestedBufferSize ;
-              print_int32 "dwWidth" dwWidth;
-              print_int32 "dwHeight" dwHeight;
-*)
               seek_in ic ((Int64.to_int pos) + main_header_len + 20);
-              let s = input_string4 ic in
-(*              print_string4 "LIST:" s; *)
 
               let pos_in = pos ++ (Int64.of_int (main_header_len + 24)) in
               let last_pos = pos_in ++ size2 in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/lib/indexer1.ml ./src/utils/lib/indexer1.ml
--- ./src/utils/lib/indexer1.ml	2005-07-07 02:25:46.000000000 +0200
+++ ./src/utils/lib/indexer1.ml	2005-12-13 13:49:47.000000000 +0100
@@ -148,7 +148,6 @@
         | _ -> (doc, field) :: w.word_docs)
     
     let add idx s doc field =
-      let next_suffix = !nsuffixes in
       let suffix, filtered = add_suffix idx s in
 (*  if filtered then begin
       lprintf "SUFFIX %s IS FILTERED..." s; 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/lib/intmap.ml ./src/utils/lib/intmap.ml
--- ./src/utils/lib/intmap.ml	2004-04-16 19:14:56.000000000 +0200
+++ ./src/utils/lib/intmap.ml	2005-12-13 13:49:47.000000000 +0100
@@ -60,7 +60,7 @@
 let rec add x data = function
     Empty ->
       Node(Empty, x, data, Empty, 1)
-  | Node(l, v, d, r, h) as t ->
+  | Node(l, v, d, r, h) ->
       if x = v then
         Node(l, x, data, r, h)
       else if x < v then
@@ -91,7 +91,7 @@
 let rec remove x = function
     Empty ->
       Empty
-  | Node(l, v, d, r, h) as t ->
+  | Node(l, v, d, r, h) ->
       if x = v then
         merge l r
       else if x < v then
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/lib/misc.ml ./src/utils/lib/misc.ml
--- ./src/utils/lib/misc.ml	2005-07-23 16:19:48.000000000 +0200
+++ ./src/utils/lib/misc.ml	2005-12-13 13:49:47.000000000 +0100
@@ -118,4 +118,4 @@
     "zip" -> zip_extract filename; ""
   | "bz2" -> Misc2.bz2_extract filename
   | "gz" -> gz_extract filename
-  | _ -> failwith "wrong archive type %s" archive_type
+  | _ -> failwith (Printf.sprintf "wrong archive type %s" archive_type)
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/lib/numset.ml ./src/utils/lib/numset.ml
--- ./src/utils/lib/numset.ml	2003-04-23 00:33:40.000000000 +0200
+++ ./src/utils/lib/numset.ml	2005-12-13 13:49:47.000000000 +0100
@@ -44,7 +44,6 @@
       t.nfree <- new_len - len;
     end;
   let pos = t.nfree - 1 in
-  let free_pos = t.free.(pos) in
   t.array.(pos) <- Some v;
   t.nfree <- pos;
   pos
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/lib/stringMap.ml ./src/utils/lib/stringMap.ml
--- ./src/utils/lib/stringMap.ml	2003-04-23 00:33:40.000000000 +0200
+++ ./src/utils/lib/stringMap.ml	2005-12-13 13:49:47.000000000 +0100
@@ -60,7 +60,7 @@
 let rec add x data = function
     Empty ->
       Node(Empty, x, data, Empty, 1)
-  | Node(l, v, d, r, h) as t ->
+  | Node(l, v, d, r, h) ->
       if x = v then
         Node(l, x, data, r, h)
       else if x < v then
@@ -91,7 +91,7 @@
 let rec remove x = function
     Empty ->
       Empty
-  | Node(l, v, d, r, h) as t ->
+  | Node(l, v, d, r, h) ->
       if x = v then
         merge l r
       else if x < v then
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/lib/unix32.ml ./src/utils/lib/unix32.ml
--- ./src/utils/lib/unix32.ml	2005-10-23 18:05:41.000000000 +0200
+++ ./src/utils/lib/unix32.ml	2005-12-13 13:49:47.000000000 +0100
@@ -183,13 +183,11 @@
         although we are reading here, but I had problems with
         it like exceptions in really_write
       *)
-      let final_pos = Unix2.c_seek64 fd file_pos Unix.SEEK_SET in
       if verbose then lprintf "really_read %d\n" len;
       Unix2.really_read fd string string_pos len
 
     let write file file_pos string string_pos len =
       let fd = local_force_fd file true in
-      let final_pos = Unix2.c_seek64 fd file_pos Unix.SEEK_SET in
       if verbose then lprintf "really_write %d\n" len;
       begin
         try
@@ -747,7 +745,6 @@
       
       let chunk_begin = zero in
       let chunk_len = t.size in
-      let index = 0 in
       let nchunks = Array.length t.chunks in
       
       let file_out = FDCache.create f in
@@ -1431,6 +1428,7 @@
     let create_rw filename = 
       create (create_rw filename)
 
+(*
 (* the new part (shared_begin, shared_len) is shared between t1 and t2.
 It will be kept inside t1, and used by t2. The problem is what happens
 when these two files have already been partially downloaded ? This 
@@ -1438,7 +1436,7 @@
     let shared_part t1 t2 shared_begin shared_len = 
       let shared_end = shared_begin ++ shared_len in
       ()
-      
+*)      
   end
 let destroyed t = t.file_kind = Destroyed
   
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/mp3tagui/mp3_info.ml ./src/utils/mp3tagui/mp3_info.ml
--- ./src/utils/mp3tagui/mp3_info.ml	2003-04-23 00:33:40.000000000 +0200
+++ ./src/utils/mp3tagui/mp3_info.ml	2005-12-13 13:49:47.000000000 +0100
@@ -112,7 +112,6 @@
   let sample_rate =
     mpg123_freqs.(sampling_frequency) in
   let bitrate_index = (header lsr 12) land 0xF in
-  let padding = (header lsr 9) land 1 in
   let mode =
     match (header lsr 6) land 3 with
       0 -> Stereo | 1 -> Joint_stereo | 2 -> Dual_channel_stereo | _ -> Mono in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/net/basicSocket.ml ./src/utils/net/basicSocket.ml
--- ./src/utils/net/basicSocket.ml	2005-12-06 21:26:40.000000000 +0100
+++ ./src/utils/net/basicSocket.ml	2005-12-13 13:49:47.000000000 +0100
@@ -285,7 +285,7 @@
 
 let create_blocking name fd handler =
 
-  let (fdnum : int) = get_fd_num fd in
+  let (_ : int) = get_fd_num fd in
 (*
   if fdnum >= Unix32.fds_size then begin
       Unix.close fd;
@@ -515,7 +515,7 @@
   while true do
     try
       if !loop_delay > 0. then (try select [] !loop_delay;  with _ -> ());
-      let time = update_time () in
+      let _ = update_time () in
       exec_tasks !fd_tasks;
       exec_hooks !after_select_hooks;
       exec_timers !timers;
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/net/cobs.ml ./src/utils/net/cobs.ml
--- ./src/utils/net/cobs.ml	2004-01-30 07:11:07.000000000 +0100
+++ ./src/utils/net/cobs.ml	2005-12-13 13:49:47.000000000 +0100
@@ -146,15 +146,10 @@
   if pos = len then list
   else
   let flags = int_of_char s.[pos] in
-  let last = (flags land (1 lsl 7)) <> 0 in
   let cobs_encoded = (flags land (1 lsl 6)) <> 0 in
-(*  lprintf "cobs_encoded %b\n" cobs_encoded; *)
-  let compressed = (flags land (1 lsl 5)) <> 0 in
-(*  lprintf "compressed %b\n" compressed; *)
   let id_len = flags land 7 in
   let id = String.sub s (pos+1) id_len in
   let data_len, pos = get_len s (pos+1+id_len) 0 in
-(*  lprintf "data_len %d,pos %d, len %d\n" data_len pos len; *)
   let data = String.sub s pos data_len in
   let data = 
     if cobs_encoded then decode data else data in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/net/ip.ml ./src/utils/net/ip.ml
--- ./src/utils/net/ip.ml	2005-10-16 22:42:55.000000000 +0200
+++ ./src/utils/net/ip.ml	2005-12-13 13:49:47.000000000 +0100
@@ -49,7 +49,7 @@
   with _ ->
       Printf.sprintf "%03d.%03d.%03d.%03d" a4 a3 a2 a1
 
-let to_int64  ((a4, a3, a2, a1) as t) =
+let to_int64 (a4, a3, a2, a1) =
   let small = a1 lor (a2 lsl 8) lor (a3 lsl 16) in
   (Int64.of_int small) ++ (Int64.shift_left (Int64.of_int a4) 24)
 
@@ -101,14 +101,14 @@
 let rec matches ((a4,a3,a2,a1) as a) ips =
   match ips with
     [] -> false
-  | ((b4,b3,b2,b1) as b) :: tail ->
+  | (b4,b3,b2,b1) :: tail ->
       ( (a4 = b4 || b4 = 255) &&
         (a3 = b3 || b3 = 255) &&
         (a2 = b2 || b2 = 255) &&
         (a1 = b1 || b1 = 255))
       || (matches a tail)
 
-let compare ((a4,a3,a2,a1) as a) ((b4,b3,b2,b1) as b) =
+let compare (a4,a3,a2,a1) (b4,b3,b2,b1) =
   let c4 = compare a4 b4 in
   if c4 <> 0 then c4 else
   let c3 = compare a3 b3 in
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/net/ip_set.ml ./src/utils/net/ip_set.ml
--- ./src/utils/net/ip_set.ml	2005-12-05 19:37:34.000000000 +0100
+++ ./src/utils/net/ip_set.ml	2005-12-13 13:49:47.000000000 +0100
@@ -253,7 +253,7 @@
 	       let file = Zip.find_entry ic "guarding.p2p" in
 	         Zip.close_in ic;
 		 lprintf_nl () "guarding.p2p found in zip file";
-		 let s = Misc.archive_extract filename "zip" in
+		 let _ = Misc.archive_extract filename "zip" in
 		 load_merge bl_empty file.Zip.filename true
 	       with e ->
 		 begin
@@ -261,7 +261,7 @@
 		     let file = Zip.find_entry ic "guarding_full.p2p" in
 		       Zip.close_in ic;
 		       lprintf_nl () "guarding_full.p2p found in zip file";
-		       let s = Misc.archive_extract filename "zip" in
+		       let _ = Misc.archive_extract filename "zip" in
 		       load_merge bl_empty file.Zip.filename true
 		     with e ->
 		       Zip.close_in ic;
@@ -347,7 +347,7 @@
           let nright = print_list_aux right in
           nleft + 1 + nright in
 
-  let count = print_list_aux bl in
+  let _ = print_list_aux bl in
   Printf.bprintf buf "%d ranges loaded - optimized to %d\n" !ranges_1 !ranges_2
 
 let bl = ref BL_Empty
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/net/multicast.ml ./src/utils/net/multicast.ml
--- ./src/utils/net/multicast.ml	2005-06-20 20:38:49.000000000 +0200
+++ ./src/utils/net/multicast.ml	2005-12-13 13:49:47.000000000 +0100
@@ -93,7 +93,6 @@
   with 
   | Exit -> 
       close sock;
-      let msg = buffer in
       Marshal.from_string buffer 0
   | e -> close sock; raise e
       
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/net/tcpBufferedSocket.ml ./src/utils/net/tcpBufferedSocket.ml
--- ./src/utils/net/tcpBufferedSocket.ml	2005-12-06 21:26:40.000000000 +0100
+++ ./src/utils/net/tcpBufferedSocket.ml	2005-12-13 14:14:48.000000000 +0100
@@ -179,7 +179,6 @@
 
 let schedule_connections () =
   let max_wanted = !max_opened_connections () in
-  let current_connections = !opened_connections in
   let max_connections_per_second = !max_connections_per_second () in
 
   let rec iter todo_managers done_managers =
@@ -622,8 +621,7 @@
             t.event_handler t BUFFER_OVERFLOW;
             lprintf "[OVERFLOW] in %s" (info sock);
             close t Closed_for_overflow;
-            raise exn_exit;
-            0
+            raise exn_exit
           )
         else
         if b.len + min_read_size < buf_len then
@@ -1340,8 +1338,7 @@
 (*Printf.bprintf buf "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; Hotbar 2.0)\n";*)
         Printf.bprintf buf "User-Agent: MLdonkey/%s\n" Autoconf.current_version;
         Printf.bprintf buf "\n";
-        let nw = MlUnix.write s (Buffer.contents buf) 0 (Buffer.length buf) in
-        ()
+        ignore (MlUnix.write s (Buffer.contents buf) 0 (Buffer.length buf))
       end;
     let t = create token name s handler in
 
diff -a -x CVS -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -N -r -u ./src/utils/net/udpSocket.ml ./src/utils/net/udpSocket.ml
--- ./src/utils/net/udpSocket.ml	2005-10-16 22:42:55.000000000 +0200
+++ ./src/utils/net/udpSocket.ml	2005-12-13 13:49:47.000000000 +0100
@@ -216,10 +216,10 @@
             try
               let len = String.length s in
 
-              let code = 
+              let _ =
                 try
                   if ping then declare_ping ip;
-                  Unix.sendto (fd sock) s 0 len [] addr 
+                  ignore(Unix.sendto (fd sock) s 0 len [] addr)
                 with e ->
                     lprintf "Exception in sendto %s:%d\n" (Ip.to_string ip) port;
                     raise e
@@ -291,7 +291,7 @@
   try
     iter_write_no_bc t sock 
   with
-    Unix.Unix_error ((Unix.EWOULDBLOCK | Unix.ENOBUFS), _, _) as e -> 
+    Unix.Unix_error ((Unix.EWOULDBLOCK | Unix.ENOBUFS), _, _) -> 
       must_write t.sock true
 
 let rec iter_write t sock bc = 
@@ -329,7 +329,7 @@
   try
     iter_write t sock bc    
   with
-    Unix.Unix_error ((Unix.EWOULDBLOCK | Unix.ENOBUFS), _, _) as e -> 
+    Unix.Unix_error ((Unix.EWOULDBLOCK | Unix.ENOBUFS), _, _) -> 
       must_write sock true
       
 let udp_handler t sock event = 
