INF: Win32 SDK Sample Build Warnings
PSS ID Number: Q102114
Article last modified on 07-27-1994

3.10

WINDOWS NT


----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Win32 Software Development Kit (SDK) for Windows NT
   version 3.1
----------------------------------------------------------------------

SUMMARY
=======

Microsoft's goal was that the Win32 Software Development Kit (SDK) samples
would compile cleanly at warning level 3 (-W3). However, due to time
constraints, there are warnings that occur when building two of the samples
on both x86 and MIPS.

MORE INFORMATION
================

The warnings are as follows:

MSTOOLS\SAMPLES\SDKTOOLS\ANIEDIT

   anicmd.c(768) : warning C4047: 'argument' : 'long ' differs in levels
      of indirection from 'void *'
   anicmd.c(768) : warning C4024: 'SendMessageA' : different types for
      formal and actual parameter 4

MSTOOLS\SAMPLES\SNMP\SNMPUTIL

   snmputil.c(463) : warning C4101: 'requestId' : unreferenced local
      variable

   In addition, you get an error registering the Toaster MIB in the
   SNMPUTIL sample unless you change the makefile so that TESTDLL.C and
   TESTMIB.C are compiled with /Gz.

Note that these warnings do not prevent the sample applications from
running correctly, and therefore they can be ignored.

One error you may encounter is the following:

Q_A\SAMPLES\SHAREMEM

   sharemem.cpp(204) : error C2106 : "=" : left operand must be l-value

This error is encountered if you rename SHAREMEM.C to SHAREMEM.CPP.

The following changes should be made to avoid these warnings:

   anicmd.c(768) : typecast 4th parameter of SendMessage()

      SendMessage( hwndCaller, AIM_SETCHILDAPP, 0, (LPARAM) hwnd );

   snmputil.c(79) : delete line

      AsnInteger requestId;

   sharemem.cpp(204) : typecast the right-hand side of the equation

      MapView = (LONG *) MapViewOfFile (..);

Additional reference words: 3.10
KBCategory: Prg
KBSubcategory: CodeSam

=============================================================================

Copyright Microsoft Corporation 1994.
