OSDN Git Service

* src/tclhelp.c (help_display_file_command): Pass int
authormdejong <mdejong>
Fri, 3 Aug 2001 23:22:43 +0000 (23:22 +0000)
committermdejong <mdejong>
Fri, 3 Aug 2001 23:22:43 +0000 (23:22 +0000)
address to Tcl_GetInt instead of an unsigned long to
avoid compiler warning.

libgui/ChangeLog
libgui/src/tclhelp.c

index aa2985c..3cbbf25 100644 (file)
@@ -1,5 +1,11 @@
 2001-08-03  Mo DeJong  <mdejong@redhat.com>
 
+       * src/tclhelp.c (help_display_file_command): Pass int
+       address to Tcl_GetInt instead of an unsigned long to
+       avoid compiler warning.
+
+2001-08-03  Mo DeJong  <mdejong@redhat.com>
+
        * src/subcommand.c:
        * src/tclgetdir.c:
        * src/tclhelp.c:
index 8603b69..d3f057a 100644 (file)
@@ -303,7 +303,8 @@ help_display_file_command (ClientData cd, Tcl_Interp *interp, int argc, char **a
 {
   struct help_command_data *hdata = (struct help_command_data *) cd;
   FILE *e;
-  DWORD   topic_id = 0; /* default topic id is 0 which brings up the find dialog */
+  int id = 0;
+  DWORD   topic_id; /* default topic id is 0 which brings up the find dialog */
 
   /* We call Help initialize just to make sure the window handle is setup */
   /* We don't care about the finding the main help file and checking the */
@@ -324,10 +325,11 @@ help_display_file_command (ClientData cd, Tcl_Interp *interp, int argc, char **a
   fclose (e);
   if (argc > 3)
   {
-      if ( Tcl_GetInt (interp, argv[3], &topic_id) != TCL_OK )
+      if ( Tcl_GetInt (interp, argv[3], &id) != TCL_OK )
         return TCL_ERROR;
   }
 
+  topic_id = (DWORD) id;
   if (! WinHelp (hdata->window, argv[2], HELP_CONTEXT, topic_id))
   {
       char buf[200];