Double return Issue in sqlite3_filename_database

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Double return Issue in sqlite3_filename_database

Damian Wilson
Hi folks

Firstly, apologies if this should go to the -dev user list, but I had to start somewhere. I noticed the following double return issue in 3.31.1 source code:

Main.c:
const char *sqlite3_filename_database(const char *zFilename){
  return databaseName(zFilename);
  return sqlite3_uri_parameter(zFilename - 3, "\003");
}

Looks to be from this commit: https://www.sqlite.org/src/info/6dbb8cb0e3dd86c5

Probably benign, but nice if it was cleaned up.

Regards
Damian

________________________________

Sophos Ltd, a company registered in England and Wales, number 2096520, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Double return Issue in sqlite3_filename_database

Richard Hipp-3
On 2/6/20, Damian Wilson <[hidden email]> wrote:
>
> Probably benign, but nice if it was cleaned up.
>

Correct.  It is benign - identical machine code is generated with and
without the extra statement.  And, curiously, the problem was not
detected by GCC even with -Wall -Wextra -pedantic-errors.  Thanks for
pointing it out.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users