MCPcopy Create free account
hub / github.com/audacity/audacity / shellPreparePrintf

Function shellPreparePrintf

lib-src/sqlite/shell.c:16101–16122  ·  view source on GitHub ↗

** Create a prepared statement using printf-style arguments for the SQL. ** ** This routine is could be marked "static". But it is not always used, ** depending on compile-time options. By omitting the "static", we avoid ** nuisance compiler warnings about "defined but not used". */

Source from the content-addressed store, hash-verified

16099** nuisance compiler warnings about "defined but not used".
16100*/
16101void shellPreparePrintf(
16102 sqlite3 *db,
16103 int *pRc,
16104 sqlite3_stmt **ppStmt,
16105 const char *zFmt,
16106 ...
16107){
16108 *ppStmt = 0;
16109 if( *pRc==SQLITE_OK ){
16110 va_list ap;
16111 char *z;
16112 va_start(ap, zFmt);
16113 z = sqlite3_vmprintf(zFmt, ap);
16114 va_end(ap);
16115 if( z==0 ){
16116 *pRc = SQLITE_NOMEM;
16117 }else{
16118 shellPrepare(db, pRc, z, ppStmt);
16119 sqlite3_free(z);
16120 }
16121 }
16122}
16123
16124/* Finalize the prepared statement created using shellPreparePrintf().
16125**

Callers 5

arCheckEntriesFunction · 0.85
arListCommandFunction · 0.85
arExtractCommandFunction · 0.85
recoverNewTableFunction · 0.85
recoverFindTableFunction · 0.85

Calls 1

shellPrepareFunction · 0.85

Tested by

no test coverage detected