473,729 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is warning "C4090"?

24 New Member
I have the following function declared:

Expand|Select|Wrap|Line Numbers
  1. void RegisterMyClass(HINSTANCE hinst, 
  2.                             WNDPROC wproc, char* clsName)
My window procedure is defined as follows:

Expand|Select|Wrap|Line Numbers
  1. LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, 
  2.                            WPARAM wParam, LPARAM lParam)
  3.  
I call "RegisterMyClas s" declared above as follows:

Expand|Select|Wrap|Line Numbers
  1. RegisterMyClass(hInstance, (WNDPROC) WindowProc, 
  2.                            MainWindowClassName);
But Visual C++ gives me this warning on that:
warning C4090: 'function' : different 'const' qualifiers

Any ideas why and how to fix it?

Thanks,
Sep 24 '09 #1
2 13502
Banfa
9,065 Recognized Expert Moderator Expert
Different const qualifiers normally means you have used a variable or pointer to a variable declared const where the compiler expected one declared non-const.

I would check your declaration of MainWindowClass Name.
Sep 24 '09 #2
DelphiCoder
24 New Member
Thanks a lot. I was focusing on the WNDPROC parameter. You are right.
Sep 24 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
1691
by: sergio.borghese | last post by:
Hello, Why this code compile without any warning? I compile it on gcc 3.3.4 with the following command: gcc -Wall -pedantic -ansi test.c #include <stdlib.h> #include <stdio.h>
3
2724
by: Bas Wassink | last post by:
Hello there, I'm having trouble understanding a warning produced by 'splint', a code-checker. The warning produced is: keywords.c: (in function keyw_get_string) keywords.c:60:31: Released storage Keywords.Keyword reachable from global A global variable does not satisfy its annotations when control is transferred. (Use -globstate to inhibit warning) keywords.c:60:11: Storage Keywords.Keyword released
16
2350
by: cody | last post by:
Shouldn't if (this!=null) generate a compiler warning? in fact, it does not.
1
1519
by: wanglei0214 | last post by:
I compiles a program in SLOS, but there is a warning i donot know how to remove? here is the framework of the code: typedef struct device_tree { ...... union {
5
5091
by: Peter Ritchie [C# MVP] | last post by:
I've purposely been ignoring a CA2122 warning in some C++ interop code I've been working on for quite some time. I've just recently had the cycles to investigate the warning. The warning message is as follows Warning CA2122 : Microsoft.Security : MyClass.Method():Void calls into Marshal.GetExceptionPointers():IntPtr which has a LinkDemand. By making this call, Marshal.GetExceptionPointers():IntPtr is indirectly exposed to user code....
5
1472
by: DaVinci | last post by:
int main() { double d = 33.33; int i = d; return 0; } Makefile: gcc -c -g -Wall -std=c99 test.c
1
6416
by: Ian | last post by:
I've just discovered the msclr::lock class in the C++ Support Library online documentation. This seems like a much cleaner way to implement thread protection than using monitor::enter/try/finally/monitor exit. However, I cannot get around one of the warning messages and am requesting help in understanding what is causing the warning. All of the online sample code for the class msclr::lock generates the same warning message. I have...
1
1640
by: Eran.Yasso | last post by:
Hi, As subject says. Just wondering... I am in level 4. Thanks.
92
6216
by: Heinrich Pumpernickel | last post by:
what does this warning mean ? #include <stdio.h> int main() { long l = 100; printf("l is %li\n", l * 10L);
31
2436
by: Tommy | last post by:
struct stat *stats IF_LINT (= 0); I don't know why "IF_LINT (= 0)" is needed ? Source is df.c of df program on Linux coreutils-5.2.1\coreutils-5.2.1\src Thanks!
0
8921
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9284
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8151
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.