473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

What is warning "C4090"?

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 "RegisterMyClass" 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 13416
Banfa
9,065 Expert Mod 8TB
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 MainWindowClassName.
Sep 24 '09 #2
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
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
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...
16
by: cody | last post by:
Shouldn't if (this!=null) generate a compiler warning? in fact, it does not.
1
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
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...
5
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
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...
1
by: Eran.Yasso | last post by:
Hi, As subject says. Just wondering... I am in level 4. Thanks.
92
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.