This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I used "Change funtion parameters" to a function that takes variable arguments (like printf does). I inserted a new 1-st parameter. Function declatation and definition was refactored ok. But its usages were changed wrong: arguments I passed were lost. This can be very frustrating since expressions I passed to the function were removed. And the code remains compilable (it better won't!) Code before refactoing: //----------------------------------------------------------- #include <stdio.h> #include <stdarg.h> static int trace_flag = 1; void trace(const char *format, ...); void trace(const char *format, ...) { if (trace_flag) { va_list args; va_start(args, format); fprintf(stderr, "fs_server[%li]: ", (long) getpid()); vfprintf(stderr, format, args); va_end(args); fflush(stderr); } } int funct(int cnt, char* p1, char* p2) { trace("cnt=%d p1=%s p2=%s\n", cnt, p1, p2); return 0; } void main() { funct(1, "a", "b"); } Code after refactoing: //----------------------------------------------------------- #include <stdio.h> #include <stdarg.h> static int trace_flag = 1; void trace(int partrace_level, const char *format, ...); void trace(int partrace_level, const char *format, ...) { if (trace_flag) { va_list args; va_start(args, format); fprintf(stderr, "fs_server[%li]: ", (long) getpid()); vfprintf(stderr, format, args); va_end(args); fflush(stderr); } } int funct(int cnt, char* p1, char* p2) { trace(1, "cnt=%d p1=%s p2=%s\n", cnt); // ERROR: p1, p2 are lost return 0; } void main() { funct(1, "a", "b"); }